When compiled for debugging warn if a thread calls idle() holding mutex locks.
git-svn-id: http://yate.null.ro/svn/yate/trunk@2831 acf43c95-373e-0410-b603-e72c3f656dc1
This commit is contained in:
parent
3666da4a2d
commit
fb6762b981
|
@ -653,6 +653,12 @@ void Thread::yield(bool exitCheck)
|
|||
|
||||
void Thread::idle(bool exitCheck)
|
||||
{
|
||||
#ifdef DEBUG
|
||||
const Thread* t = Thread::current();
|
||||
if (t && t->locked())
|
||||
Debug(DebugMild,"Thread '%s' idling with %d mutex locks held [%p]",
|
||||
t->name(),t->locks(),t);
|
||||
#endif
|
||||
msleep(THREAD_IDLE_MSEC,exitCheck);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue