mirror of
https://github.com/juce-framework/JUCE.git
synced 2026-01-10 23:44:24 +00:00
This commit is contained in:
parent
7989702525
commit
727215e270
1 changed files with 3 additions and 4 deletions
|
|
@ -333,17 +333,19 @@ bool MessageManager::currentThreadHasLockedMessageManager() const
|
|||
|
||||
//==============================================================================
|
||||
MessageManagerLock::MessageManagerLock() throw()
|
||||
: locked (true)
|
||||
: locked (false)
|
||||
{
|
||||
if (MessageManager::instance != 0)
|
||||
{
|
||||
MessageManager::instance->messageDispatchLock.enter();
|
||||
lastLockingThreadId = MessageManager::instance->currentLockingThreadId;
|
||||
MessageManager::instance->currentLockingThreadId = Thread::getCurrentThreadId();
|
||||
locked = true;
|
||||
}
|
||||
}
|
||||
|
||||
MessageManagerLock::MessageManagerLock (Thread* const thread) throw()
|
||||
: locked (false)
|
||||
{
|
||||
jassert (thread != 0); // This will only work if you give it a valid thread!
|
||||
|
||||
|
|
@ -360,10 +362,7 @@ MessageManagerLock::MessageManagerLock (Thread* const thread) throw()
|
|||
}
|
||||
|
||||
if (thread != 0 && thread->threadShouldExit())
|
||||
{
|
||||
locked = false;
|
||||
break;
|
||||
}
|
||||
|
||||
Thread::sleep (1);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue