Commit 7088021d authored by separdau's avatar separdau

Fix a bug I think, since a thread_obj is always == to its vm->scheme_thread

 field.
parent 0c2e55f8
......@@ -145,8 +145,7 @@ DEFINE_PRIMITIVE("thread-terminate!", thread_terminate, subr1, (SCM thr))
pthread_mutex_lock(&THREAD_MYMUTEX(thr));
/* Terminate effectively the thread */
// FIXME: this looks like an error
if (thr == THREAD_VM(thr)->scheme_thread)
if (thr == STk_get_current_vm()->scheme_thread)
pthread_exit(0); /* Suicide */
else
pthread_cancel(THREAD_PTHREAD(thr)); /* terminate an other thread */
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment