From 11770479a93ead1c1f20e649afdc445c2ee2a3f3 Mon Sep 17 00:00:00 2001 From: paulc Date: Mon, 6 Oct 2008 13:42:27 +0000 Subject: [PATCH] Abandon unkillable pthreads instead of forcingly destroying them. git-svn-id: http://voip.null.ro/svn/yate@2252 acf43c95-373e-0410-b603-e72c3f656dc1 --- engine/Thread.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/engine/Thread.cpp b/engine/Thread.cpp index 24758add..998c0735 100644 --- a/engine/Thread.cpp +++ b/engine/Thread.cpp @@ -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);