David Brown wrote: > On Tue, Apr 13, 2004 at 09:57:35AM +0200, Christophe Raffalli wrote: > >>Message posted to comp.os.linux.misc and caml-list. >> >>I am having a scheduling problem with a Caml program that uses two threads: >>- one CPU intensive thread >>- one interface thread (using Glut + OpenGL) and often doing nothing > > > What wrappers are you using to call to the interface. Are there any > blocking calls in it? You might check the wrappers to these calls to > make sure that they call enter_blocking_section, and > leave_blocking_section. Otherwise, the entire ocaml runtime will be > blocked. I do not understand ? First I launch the interface thread from Caml with Thread.create and the interface thread calls Glut.main_loop which never ends (except when the program terminates). This main loop call some Caml functions. The interface thread (which is the main thread) is affected a lot may be because the main_loop sleep while retaining a mutex blocking the computing thread. This is hat you mean ? > Dave -- Christophe Raffalli Université de Savoie Batiment Le Chablais, bureau 21 73376 Le Bourget-du-Lac Cedex tél: (33) 4 79 75 81 03 fax: (33) 4 79 75 87 42 mail: Christophe.Raffalli@univ-savoie.fr www: http://www.lama.univ-savoie.fr/~RAFFALLI --------------------------------------------- IMPORTANT: this mail is signed using PGP/MIME At least Enigmail/Mozilla, mutt or evolution can check this signature ---------------------------------------------