From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from nez-perce.inria.fr (nez-perce.inria.fr [192.93.2.78]) by yquem.inria.fr (Postfix) with ESMTP id 8E7FEBDE9 for ; Thu, 1 Sep 2005 15:28:34 +0200 (CEST) Received: from pauillac.inria.fr (pauillac.inria.fr [128.93.11.35]) by nez-perce.inria.fr (8.13.0/8.13.0) with ESMTP id j81DSXAg018061 for ; Thu, 1 Sep 2005 15:28:33 +0200 Received: from nez-perce.inria.fr (nez-perce.inria.fr [192.93.2.78]) by pauillac.inria.fr (8.7.6/8.7.3) with ESMTP id PAA22260 for ; Thu, 1 Sep 2005 15:28:33 +0200 (MET DST) Received: from nproxy.gmail.com (nproxy.gmail.com [64.233.182.194]) by nez-perce.inria.fr (8.13.0/8.13.0) with ESMTP id j81DSW0B018058 for ; Thu, 1 Sep 2005 15:28:33 +0200 Received: by nproxy.gmail.com with SMTP id l37so126709nfc for ; Thu, 01 Sep 2005 06:28:32 -0700 (PDT) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:reply-to:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=GAA+56o1z2O+CxI4V2MS8nSj6Kt+QkhQWVYRpjgd/7INrkItSO+bLc99E7PqMB2U/t0/fA08KJAg39vyrr+XrIzPcsVrmeZq/C+Uj9urpVgcLaJTxFWrzTR3CIkkwmuI2gKE8Q7jxA132hWcUaPEGd8NBcNYqCYyIedCgRYkIdQ= Received: by 10.48.108.4 with SMTP id g4mr105397nfc; Thu, 01 Sep 2005 06:28:32 -0700 (PDT) Received: by 10.48.42.9 with HTTP; Thu, 1 Sep 2005 06:28:32 -0700 (PDT) Message-ID: <3d13dcfc0509010628155a4d6e@mail.gmail.com> Date: Thu, 1 Sep 2005 15:28:32 +0200 From: David MENTRE To: skaller Subject: Re: [Caml-list] Re: Feeding the OCaml GUI troll Cc: Matt Gushee , caml-list@inria.fr, ocaml-gui@googlegroups.com In-Reply-To: <1125580528.7192.23.camel@localhost.localdomain> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline References: <20050830174757.99765.qmail@web30510.mail.mud.yahoo.com> <200508302001.58080.jon@ffconsultancy.com> <3d13dcfc05083101487092acd5@mail.gmail.com> <43168841.9000302@havenrock.com> <1125580528.7192.23.camel@localhost.localdomain> X-Miltered: at nez-perce with ID 43170201.000 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Miltered: at nez-perce with ID 43170200.002 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Spam: no; 0.00; caml-list:01 ocaml:01 callbacks:01 threads:01 threads:01 ocaml:01 handler:01 sourceforge:01 data:02 callback:02 module:03 gui:04 scheme:04 space:07 mess:08 X-Spam-Checker-Version: SpamAssassin 3.0.3 (2005-04-27) on yquem.inria.fr X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=RCVD_BY_IP autolearn=disabled version=3.0.3 Hello, 2005/9/1, skaller : > I am. My idea is this: GET RID OF CALLBACKS. > The idea is to use (user space) threads instead. The main issue with threads is that as soon as you want to share state/data between threads, it becomes a mess. Of course, you can have some clean tools like OCaml channels in module Event, but they don't avoid issues like deadlocks. The callback and main event handler scheme as the advantage of simplicity: your program does only one thing at a time. Yours, d.