Dans Thread.kill, tester si thread deja kille.
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@1534 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02master
parent
f52ee478ba
commit
5334997d00
|
@ -553,6 +553,7 @@ value thread_kill(thread) /* ML */
|
|||
{
|
||||
value retval = Val_unit;
|
||||
thread_t th = (thread_t) thread;
|
||||
if (th->status == KILLED) failwith("Thread.kill: killed thread");
|
||||
/* Don't paint ourselves in a corner */
|
||||
if (th == th->next) failwith("Thread.kill: cannot kill the last thread");
|
||||
/* This thread is no longer waiting on anything */
|
||||
|
|
Loading…
Reference in New Issue