From mboxrd@z Thu Jan 1 00:00:00 1970 Received: (from weis@localhost) by pauillac.inria.fr (8.7.6/8.7.3) id NAA06270 for caml-redistribution; Wed, 17 Mar 1999 13:44:40 +0100 (MET) Received: from concorde.inria.fr (concorde.inria.fr [192.93.2.39]) by pauillac.inria.fr (8.7.6/8.7.3) with ESMTP id SAA07076 for ; Tue, 16 Mar 1999 18:42:22 +0100 (MET) Received: from pernand.inria.fr (pernand.inria.fr [128.93.8.58]) by concorde.inria.fr (8.8.7/8.8.7) with ESMTP id SAA07798 for ; Tue, 16 Mar 1999 18:42:20 +0100 (MET) Received: from localhost (furuse@localhost) by pernand.inria.fr (8.6.10/8.6.6) with SMTP id SAA26803 for ; Tue, 16 Mar 1999 18:42:21 +0100 Message-Id: <199903161742.SAA26803@pernand.inria.fr> X-Authentication-Warning: pernand.inria.fr: Host localhost didn't use HELO protocol To: caml-list@inria.fr Subject: Re: threads & OCamlTK In-reply-to: Your message of Tue, 16 Mar 1999 09:18:01 -0800. <199903161715.JAA04021@fiji01.liquidmarket.com> From: "Jun P. Furuse" Date: Tue, 16 Mar 1999 18:42:20 +0100 Sender: weis Francois Rouaix wrote: > > And, on a vaguely related topic, is it possible to use threads > > with programs > > that also use OCamlTK? I know Tk is not threadsafe, but if only > > one thread is calling Tk functions, then perhaps it's still OK? > > Yes, it should be ok. But this also includes the Tk event loop, and thus > all callbacks. Also, there is the issue of using Thread primitives within > a callback (e.g. having the callback on a button triggering a condition). > In bytecode threads, this will probably not work. > Jun and I discussed these issues a long time ago, and Jun implemented > a modified version of the CamlTK core where the event loop would be handled > in Caml instead of C, so as to be compatible with threads, to some extent > (all other Tk calls still need to be in a critical section). > I don't think we ever distributed this version, and I'm not even sure it > would work on Windows, but you might want to check with Jun. I implemented this threaded version of OCamlTk, called ThreadTk about one year ago. You can see the code at the caml cvs: http://camlcvs.inria.fr/cgi-bin/cvsweb.out/bazar-ocaml/camltk41/thread-tk/ Please README.threadtk for more information. But this is based on an old release of OCamlTk and not maintained at all for long. I may update it if I have some spare time... ----------------------------------------------------------------------- Jun P. Furuse Jun.Furuse@inria.fr INRIA Institut National de Recherche en Informatique et en Automatique