[Lablgtk] CPU consumption with GtkThread

Maxence Guesdon Maxence.Guesdon at inria.fr
Tue Dec 14 08:49:59 CET 2010


On Tue, 14 Dec 2010 08:36:26 +0100
Maxence Guesdon <Maxence.Guesdon at inria.fr> wrote:

> Hello,
> 
> When I use GtkThread.main (), my process consumes a lot of CPU. Having a
> look at the code of GtkThread.ml, I see a never ending loop, and especially
> a never-delaying loop, which I think results in the consumption.
> 
> Is it normal ? Isn't there a way to use threads without such a consumption ?

Well, I just saw that Adrien proposed a workaround/fix for this problem on
the list one year ago:
  http://yquem.inria.fr/pipermail/lablgtk/2009-December/000335.html

He changed
  Thread.delay 0.0001;
into
  Thread.delay 0.013;

Could we integrate this ? And may be provide a function to change the delay
used in the fix ?

Regards,

Maxence



_______________________________________________
Lablgtk mailing list
Lablgtk at yquem.inria.fr
http://yquem.inria.fr/cgi-bin/mailman/listinfo/lablgtk




More information about the Lablgtk-list mailing list