From mboxrd@z Thu Jan 1 00:00:00 1970 Received: (from majordomo@localhost) by pauillac.inria.fr (8.7.6/8.7.3) id WAA06811; Thu, 11 Sep 2003 22:31:59 +0200 (MET DST) X-Authentication-Warning: pauillac.inria.fr: majordomo set sender to owner-caml-list@pauillac.inria.fr using -f 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 WAA09550 for ; Thu, 11 Sep 2003 22:31:58 +0200 (MET DST) Received: from beech (beech.ucdavis.edu [128.120.141.134]) by concorde.inria.fr (8.11.1/8.11.1) with ESMTP id h8BKVuf17235 for ; Thu, 11 Sep 2003 22:31:57 +0200 (MET DST) Received: from ijtrotts by beech with local (Exim 3.36 #1 (Debian)) id 19xYCi-0001mx-00; Thu, 11 Sep 2003 13:38:12 -0700 Date: Thu, 11 Sep 2003 13:38:12 -0700 From: Issac Trotts To: Christophe Raffalli Cc: caml-list@inria.fr Subject: Re: [Caml-list] FreeBSD + lablglut + thread: bug or not bug Message-ID: <20030911203812.GA6734@beech> Reply-To: ijtrotts@ucdavis.edu References: <20030910185255.GF25815@ecooper.com> <3F607D6F.4010405@univ-savoie.fr> <20030911173321.GA4359@beech> <3F60D66A.2010204@univ-savoie.fr> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <3F60D66A.2010204@univ-savoie.fr> User-Agent: Mutt/1.5.4i X-Loop: caml-list@inria.fr X-Spam: no; 0.00; issac:01 trotts:01 ijtrotts:01 caml-list:01 lablglut:01 bug:01 bug:01 raffalli:01 glsurf:01 threads:01 mainloop:01 callback:01 callback:01 mainloop:01 glsurf:01 Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk On Thu, Sep 11, 2003 at 10:09:14PM +0200, Christophe Raffalli wrote: > > By the way, I think vmthread are no use for a program like Glsurf: > > They are two threads and once the openGL thread has called Glut.mainLoop > it will only call Caml code from callback from C ... and is seems that > this prevent the premption of the thread and the computing thread will > never have a chance to run, even if I call Thread.yield in the Idle > callback function (at least this is what I observed) > > Am I right ? You are right that Glut.mainLoop makes vmthreads useless, but this doesn't imply that vmthreads are of no use for Glsurf (see below). > This limits a lot the use of vmthread : no native code compilation, > requirement for all threads to run "toplevel" Caml code (no Caml code > from C) often and may be other limitation that I don't know of. That's a > lot :-( Another way to look at it is that it limits the use of GLUT, which ought to have an open event loop as in SDL and OCaml's Graphics library. Using OCamlSDL would probably make it possible to use vmthreads, though I haven't tried it myself. > And just a remark, like other people, I feel my machine is much faster > (not for pure computation) under FreeBSD than Linux (mdk 9.0). Starting > KDE or compiling ocaml (especially the ./configure script), seemed much > faster. I should do some timing. Have you tried recompiling your Linux kernel? Which distribution are you running? Issac Trotts -- ------------------- To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/ Beginner's list: http://groups.yahoo.com/group/ocaml_beginners