Report the number of threads that are to be cancelled at shutdown.
Protect against not cancelling threads if compiling with SOFT_WAITS <= 0. git-svn-id: http://yate.null.ro/svn/yate/trunk@3386 acf43c95-373e-0410-b603-e72c3f656dc1
This commit is contained in:
parent
a412a081e2
commit
d8b784be12
|
@ -429,6 +429,8 @@ void ThreadPrivate::killall()
|
|||
ThreadPrivate *t;
|
||||
bool sledgehammer = false;
|
||||
s_tmutex.lock();
|
||||
int c = s_threads.count();
|
||||
Debug(DebugNote,"Soft cancelling %d running threads",c);
|
||||
ObjList* l = &s_threads;
|
||||
while (l && (t = static_cast<ThreadPrivate *>(l->get())) != 0)
|
||||
{
|
||||
|
@ -436,7 +438,6 @@ void ThreadPrivate::killall()
|
|||
t->cancel(false);
|
||||
l = l->next();
|
||||
}
|
||||
int c;
|
||||
for (int w = 0; w < SOFT_WAITS; w++) {
|
||||
s_tmutex.unlock();
|
||||
Thread::idle();
|
||||
|
|
Loading…
Reference in New Issue