Abandon unkillable pthreads instead of forcingly destroying them.

git-svn-id: http://voip.null.ro/svn/yate@2252 acf43c95-373e-0410-b603-e72c3f656dc1
This commit is contained in:
paulc 2008-10-06 13:42:27 +00:00
parent f14b182040
commit 11770479a9
1 changed files with 6 additions and 0 deletions

View File

@ -382,12 +382,18 @@ void ThreadPrivate::killall()
c = 1;
else {
if (ok) {
#ifdef _WINDOWS
Debug(DebugGoOn,"Could not kill %p but seems OK to delete it (library bug?)",t);
s_tmutex.unlock();
t->destroy();
s_tmutex.lock();
if (t != l->get())
c = 1;
#else
Debug(DebugGoOn,"Could not kill cancelled %p so we'll abandon it (library bug?)",t);
l->remove(t,false);
c = 1;
#endif
continue;
}
Thread::msleep(1);