Version française
Home     About     Download     Resources     Contact us    

This site is updated infrequently. For up-to-date information, please visit the new OCaml website at

Browse thread
[Caml-list] suggestion for record pattern matching and construction
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: 2003-09-11 (20:31)
From: Issac Trotts <ijtrotts@u...>
Subject: Re: [Caml-list] FreeBSD + lablglut + thread: bug or not bug
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

Issac Trotts


To unsubscribe, mail Archives:
Bug reports: FAQ:
Beginner's list: