DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=pYBessDFsZRdzc6inomFg3/MD4p4BJ4enGWhDSdvCya5g54uJF/FvcjqUDq7Ebfwrlbo4a3Mg8R8Uh/SZmVI8zRQ4czbRu4GgQ7+U5N+Zju7fO5KHTApX0NcwxbFtwWZssf9rlpnMhzL7JJn8qaTutk3JxTue0P8t5Otp0QuowY= Message-ID: Date: Tue, 25 Oct 2005 01:15:06 +0100 From: Robert Schneck-McConnell To: Jacques Garrigue Subject: Re: Threading issues, and custom tree models Cc: lablgtk at math.nagoya-u.ac.jp In-Reply-To: <20051024.094207.125901964.garrigue at math.nagoya-u.ac.jp> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Disposition: inline References: <20051024.094207.125901964.garrigue@math.nagoya-u.ac.jp> Content-Transfer-Encoding: 8bit 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? Robert