diff options
author | Xavier Leroy <xavier.leroy@inria.fr> | 1997-05-13 14:06:17 +0000 |
---|---|---|
committer | Xavier Leroy <xavier.leroy@inria.fr> | 1997-05-13 14:06:17 +0000 |
commit | 5334997d0054c4eb4598a78f629cdadd1f498978 (patch) | |
tree | 9c06f53a646b7132365de472c764a22a2145fd0f /otherlibs/threads/scheduler.c | |
parent | f52ee478bae32df3f819d0890cb2e6308aebc358 (diff) | |
download | ocaml-5334997d0054c4eb4598a78f629cdadd1f498978.tar.gz |
Dans Thread.kill, tester si thread deja kille.
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@1534 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
Diffstat (limited to 'otherlibs/threads/scheduler.c')
-rw-r--r-- | otherlibs/threads/scheduler.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/otherlibs/threads/scheduler.c b/otherlibs/threads/scheduler.c index 1b6d789f0c..33ab249e02 100644 --- a/otherlibs/threads/scheduler.c +++ b/otherlibs/threads/scheduler.c @@ -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 */ |