Re: CPU consumption with GtkThread
Maxence Guesdon <[email protected]> Tue, 14 Dec 2010 08:49:59 +0100
| Newsgroups | gmane.comp.lang.ocaml.lib.gtk |
|---|---|
| Organization | INRIA |
| Message-ID | <20101214084959.0c5ce2ef@alcazar> |
On Tue, 14 Dec 2010 08:36:26 +0100 Maxence Guesdon <[email protected]> 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