[Gtk-sharp-list] Pause the execution of crowded computation to allow the GUI to refresh

Adam Tauno Williams awilliam at whitemice.org
Fri Apr 23 14:04:26 EDT 2010


On Fri, 2010-04-23 at 09:57 -0800, fpiraneo wrote:
> Hi all,
> I have a very long computation to perform on my application and I'm showing
> the progress with a progress bar. Unfortunately the progress bar doesn't
> refresh because my computation takes full computing time and doesn't allow
> the GUI to refresh (the progress bar too) and the timeout set up doesn't
> start.
> So I'm asking: Is there any way to stop for some milliseconds my computation
> to allow the GUI to properly refresh? Something like the g_usleep that I
> don't find in glib implementation in mono...

I'd just start the computation in a thread and update the progress bar
via Application.Invoke.

> I've seen this: http://www.mono-project.com/Responsive_Applications but
> doesn't help me too much.

-- 
Adam Tauno Williams <awilliam at whitemice.org> LPIC-1, Novell CLA
<http://www.whitemiceconsulting.com>
OpenGroupware, Cyrus IMAPd, Postfix, OpenLDAP, Samba



More information about the Gtk-sharp-list mailing list