Date: Tue, 25 Oct 2005 10:40:10 +0900 (JST) Message-Id: <20051025.104010.09448282.garrigue at math.nagoya-u.ac.jp> To: schneck at gmail.com Cc: lablgtk at math.nagoya-u.ac.jp Subject: Re: Threading issues, and custom tree models From: Jacques Garrigue In-Reply-To: References: <20051024.094207.125901964.garrigue@math.nagoya-u.ac.jp> Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit From: Robert Schneck-McConnell > On 10/24/05, Jacques Garrigue wrote: > > The two functions GtkThread.sync and GtkThread.async are precisely for > > this purpose. > > Perfect! Well almost; I occasionally get assertion failures from line > 37 of gtkThread.ml! > Somehow, the Condition.wait on line 36 is finished even though the > Condition.signal of line 33 can't have activated. > > I get perfect results from the equivalent of replacing line 36 with > while !res = None do Condition.wait c m done; > > The OCaml library reference for module Condition seems to suggest > putting the call to > Condition.wait in a while loop; maybe that is standard procedure? Interesting. I'll correct this. Somehow this doesn't match the specification of Condition.wait (which only talks of signals on this condition), but better safe than sorry... Jacques