Delivered-To: garrigue at math.nagoya-u.ac.jp Delivered-To: lablgtk at yquem.inria.fr Date: Tue, 14 Dec 2010 08:49:59 +0100 From: Maxence Guesdon To: lablgtk at yquem.inria.fr Subject: Re: [Lablgtk] CPU consumption with GtkThread Message-ID: <20101214084959.0c5ce2ef at alcazar> In-Reply-To: <20101214083626.59faf109 at alcazar> References: <20101214083626.59faf109 at alcazar> Organization: INRIA Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Status: U On Tue, 14 Dec 2010 08:36:26 +0100 Maxence Guesdon 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@yquem.inria.fr http://yquem.inria.fr/cgi-bin/mailman/listinfo/lablgtk