more thread fixes

git-svn-id: https://yap.svn.sf.net/svnroot/yap/trunk@1655 b08c6af1-5177-4d33-ba66-4b1c6b8b522a
This commit is contained in:
vsc
2006-05-25 17:35:49 +00:00
parent 1d445a731d
commit 51553d40f2
3 changed files with 3 additions and 7 deletions

View File

@@ -294,7 +294,7 @@ Int
Yap_thread_detach_engine(int wid)
{
pthread_mutex_lock(&(ThreadHandle[wid].tlock));
if (ThreadHandle[wid].handle == worker_id)
if (ThreadHandle[wid].handle == pthread_self())
ThreadHandle[wid].handle = 0;
ThreadHandle[wid].ref_count--;
pthread_mutex_unlock(&(ThreadHandle[wid].tlock));