equal
deleted
inserted
replaced
51 if length (!threads) < (!max_threads) then () |
51 if length (!threads) < (!max_threads) then () |
52 else (tracing ("Waiting for a free thread..."); |
52 else (tracing ("Waiting for a free thread..."); |
53 ConditionVar.wait (thread_wait, thread_wait_mutex)); |
53 ConditionVar.wait (thread_wait, thread_wait_mutex)); |
54 add_thread |
54 add_thread |
55 (Thread.fork (* FIXME avoid low-level Poly/ML thread primitives *) |
55 (Thread.fork (* FIXME avoid low-level Poly/ML thread primitives *) |
56 (fn () => ML_Compiler.exn_trace threadf, |
56 (fn () => Runtime.exn_trace threadf, |
57 [Thread.EnableBroadcastInterrupt true, |
57 [Thread.EnableBroadcastInterrupt true, |
58 Thread.InterruptState |
58 Thread.InterruptState |
59 Thread.InterruptAsynchOnce]))) |
59 Thread.InterruptAsynchOnce]))) |
60 end; |
60 end; |
61 |
61 |