let creation_mutex = Mutex.create () ;;
+(* REAL IMPLEMENTATION NOT YET WORKING --ZACK
let create body arg =
do_critical creation_mutex (lazy (
ignore (Thread.create (wrap_thread body) arg);
Event.sync (Event.receive chan)
))
;;
+
let kill pid =
add_to_dead_threads_walking pid;
try
Unix.kill pid kill_signal
with e -> raise (Can_t_kill (pid, Printexc.to_string e))
;;
+*)
+
+(* FAKE IMPLEMENTATION *)
+let create x y = let _ = Thread.create x y in ~-1 ;;
+let kill _ = () ;;
(* block kill signal in main process *)
ignore (Unix.sigprocmask Unix.SIG_BLOCK [ kill_signal ]) ;;