[
Home
]
[ Index:
by date
|
by threads
]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
[ 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] Thread in OCaml |
Le 16 avr. 04, à 12:30, Christophe Raffalli a écrit : > 1) why the name enter(resp leaving)_blocking_section to release(resp > aquire) a mutex ? you aquire a mutex when you want to block other > threads. The name seems inversed to me and this did not help. I guess it is to suggest that you are going to enter a section where C calls may block. The names were given from the perpsective of what happens between enter/leave. In my opinion, what really doesn't help is that it is not documented _at all_ in the the manual... > 2) is there a way to have two files wrap_glut.c one with > enter/leaing_blocking_section the other without (or MACROS), the right > file being used depending if the -thread or -vmthread option is given Using a library should not interfere with other part of the ocaml system. Since glut has this (bad) idea of a loop that never returns enter/leave_blocking_section should _always_ be used in the stubs so that signal handlers (see Sys.signal) can be executed. Note that in that case it is important that the callbacks from C into caml reacquires the lock via leave_blocking_section and releases it after (or a signal handler could be executing caml code concurrently with a callback). Daniel P.S. In your previous post is not clear to me what you are actually measuring. ------------------- 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