Dans Thread.kill, tester si thread deja kille.

git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@1534 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
master
Xavier Leroy 1997-05-13 14:06:17 +00:00
parent f52ee478ba
commit 5334997d00
1 changed files with 1 additions and 0 deletions

View File

@ -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 */