From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on yquem.inria.fr X-Spam-Level: X-Spam-Status: No, score=0.1 required=5.0 tests=AWL autolearn=disabled version=3.1.3 Received: from concorde.inria.fr (concorde.inria.fr [192.93.2.39]) by yquem.inria.fr (Postfix) with ESMTP id F386BBC69 for ; Mon, 30 Jul 2007 10:01:49 +0200 (CEST) Received: from XSMTP0.ethz.ch (xsmtp0.ethz.ch [82.130.70.14]) by concorde.inria.fr (8.13.6/8.13.6) with ESMTP id l6U81nKP003770 for ; Mon, 30 Jul 2007 10:01:49 +0200 Received: from xfe2.d.ethz.ch ([82.130.124.42]) by XSMTP0.ethz.ch with Microsoft SMTPSVC(6.0.3790.3959); Mon, 30 Jul 2007 10:01:48 +0200 Received: from [10.0.1.3] ([80.219.210.76]) by xfe2.d.ethz.ch over TLS secured channel with Microsoft SMTPSVC(6.0.3790.3959); Mon, 30 Jul 2007 10:01:48 +0200 In-Reply-To: <20070730054047.GA11678@jiyu.gnu> References: <950BC328-B571-4736-A779-8E3EE9CF6F3E@student.ethz.ch> <20070730054047.GA11678@jiyu.gnu> Mime-Version: 1.0 (Apple Message framework v752.3) Content-Type: text/plain; charset=US-ASCII; delsp=yes; format=flowed Message-Id: <93DE46B0-285F-4066-A1CA-0A3969C728B3@student.ethz.ch> Cc: caml-list@yquem.inria.fr Content-Transfer-Encoding: 7bit From: Kaspar Rohrer Subject: Re: [Caml-list] Native multithreaded LablGTK2? Date: Mon, 30 Jul 2007 10:01:47 +0200 To: Julien Moutinho X-Mailer: Apple Mail (2.752.3) X-OriginalArrivalTime: 30 Jul 2007 08:01:48.0528 (UTC) FILETIME=[E142CF00:01C7D27F] X-Miltered: at concorde with ID 46AD9AED.001 by Joe's j-chkmail (http://j-chkmail . ensmp . fr)! X-Spam: no; 0.00; lablgtk:01 lablgtk:01 ocamlfind:01 -predicates:01 cmxa:01 gtkthread:01 cmx:01 ocamlfind:01 -predicates:01 cmxa:01 gtkinit:01 cmx:01 gtkthread:01 buffer:01 stdout:01 On 30.07.2007, at 07:40, Julien Moutinho wrote: > Check the META.lablgtk2 file: > $ ocamlfind query lablgtk2 -format "%A" -predicates native,mt > lablgtk.cmxa gtkThread.cmx > > If you get this, lablgtk2 is not likely to be guilty. Here's what I get, so I suppose lablgtk2 is not guilty: > ocamlfind query lablgtk2 -format "%A" -predicates native,mt lablgtk.cmxa lablglade.cmxa lablgnomecanvas.cmxa lablgnomeui.cmxa lablpanel.cmxa gtkInit.cmx gtkThread.cmx > > For I have never used neither Omake nor Godi, cannot help more. > Nonetheless, if I were you I would dive into Omake... Hm, maybe the error is in how I use Omake. I'll look into. >> PS: Currently the application is single threaded, but due to output >> redirection using pipes, I get the occassional freeze. (Pipe gets >> flooded!) > Weird. No, not at all. The redirection happens in the same thread, so if the pipe buffer is full, all write operations will block. And because the application is single threaded, the reader never gets a chance to empty the pipe. Thus, freeze. I'm piping stdout, because that's the only way I was able to redirect stdout to a gtk text widget (using a GIOchannel: GMain.Io.*). If anybody has a better idea, I'd be glad to hear it. I was originally thinking of an out_channel that writes to a buffer instead of a file, but the Ocaml standard library seems to be missing this functionality. Or is it? Anyway, thanks a lot for your help. I appreciate it.