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] Scheduling thread problem kernel 2.6
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: Daniel_Bünzli <daniel.buenzli@e...>
Subject: Re: [Caml-list] Scheduling thread problem kernel 2.6
Le 14 avr. 04, à 11:21, Christophe Raffalli a écrit :

> You do not need in general to enter a blocking section when calling C. 
> you only need that if you call some specific Caml function from C (if 
> I remember well)

True, this message [1] confirms it (point 6) and since callbacks are 
not executed concurrently by glut there is no need to serialize them 
with enter/leave_block_section(). Apparently [2] 
enter/leave_blocking_section() are mainly used to allow the execution 
of signal callbacks during execution of long running C code that 
doesn't interact with caml code (this means that if I use the lablglut 
bindings, my signal callbacks will never be executed, so I think it 
would be better to use enter/leave_blocking_section() in the bindings 
as depicted in my previous message).

Regarding your problem, maybe glutMainLoop() is doing busy waiting. You 
can try to look into the code [3], glutMainLoop() is implemented in 
file lib/glut/glut_event.c. However this wouldn't explain the fact that 
your program was running well in another version of your system.


[1] <>
[2] <>
[3] <>
To unsubscribe, mail Archives:
Bug reports: FAQ:
Beginner's list: