[Omake] SVN Commit: OMake Build System [0.9.8.x] (Rev. 11496)

Aleksey Nogin nogin at metaprl.org
Tue Jul 31 13:10:41 PDT 2007


[Bug 535] Added a hack to address the "Sys.Break does not get raised inside C
blocking sections" problem (see
http://caml.inria.fr/pub/ml-archives/caml-list/2007/07/3662ad69f77253674f580b174c85dfbb.en.html
for detail).

My "solution" is that when threads are enabled, the Lm_notify.next_event would
run in a child thread, while the master thread periodically (currently - at
0.1s intervals) checks whether it's done. If Ctrl-C is pressed, OCaml will
interrupt the master thread with Sys.Break, which is what we want.

Note that simply having the master thread wait for the child one does not work
- we need the master thread to execute caml_leave_blocking_section()
regularly!

P.S. I have only tested this on Unix with threads enabled, will test on
Windows next.

----
Changes:
    +1 -0	libmojave/stdlib/lm_thread.ml
    +1 -0	libmojave/stdlib/lm_thread_core_null.ml
    +25 -0	libmojave/stdlib/lm_thread_core_system.ml
    +9 -0	libmojave/stdlib/lm_thread_sig.ml
    +1 -1	omake-branches/0.9.8.x/src/exec/omake_exec_notify.ml
 
A hyperlinked version of this commit is available at
http://svn.metaprl.org/commitlogs/omake/2007-07.html#07/07/31.13:10:41



More information about the OMake-CVS mailing list