X-Git-Url: http://matita.cs.unibo.it/gitweb/?a=blobdiff_plain;f=helm%2Fhbugs%2Ftutors%2Fhbugs_deity.ml;h=b1fa0f30db910f4d9759b124a14fcc1efd7ca7fc;hb=44de0d194b6f4d890605f023aaafd95e541381f0;hp=ba6caa478c12b8d6a36c04f5abac9ae1f7170b70;hpb=a9f9195de421375634346e0d55a7d06c7718488d;p=helm.git diff --git a/helm/hbugs/tutors/hbugs_deity.ml b/helm/hbugs/tutors/hbugs_deity.ml index ba6caa478..b1fa0f30d 100644 --- a/helm/hbugs/tutors/hbugs_deity.ml +++ b/helm/hbugs/tutors/hbugs_deity.ml @@ -83,18 +83,25 @@ let wrap_thread body = 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 ]) ;;