1
0
Fork 0
mirror of https://github.com/juce-framework/JUCE.git synced 2026-01-10 23:44:24 +00:00

small tweak to avoid lock-ups when closing audio plugins in some hosts.

This commit is contained in:
jules 2009-07-17 10:20:07 +00:00
parent 6fe090f2cb
commit 192cf67062
2 changed files with 8 additions and 10 deletions

View file

@ -403,11 +403,10 @@ void MessageManager::doPlatformSpecificShutdown()
// Annoyingly, cancelPerformSelectorsWithTarget can't actually cancel the messages
// sent by performSelectorOnMainThread, so need to manually flush these before quitting..
for (int i = 100; --i >= 0 && numPendingMessages > 0;)
{
flushingMessages = true;
getInstance()->runDispatchLoopUntil (10);
}
flushingMessages = true;
if (JUCEApplication::getInstance() != 0) // (must avoid blocking here when running as a plugin)
for (int i = 100; --i >= 0 && numPendingMessages > 0;)
getInstance()->runDispatchLoopUntil (10);
[juceAppDelegate release];
juceAppDelegate = 0;

View file

@ -272543,11 +272543,10 @@ void MessageManager::doPlatformSpecificShutdown()
// Annoyingly, cancelPerformSelectorsWithTarget can't actually cancel the messages
// sent by performSelectorOnMainThread, so need to manually flush these before quitting..
for (int i = 100; --i >= 0 && numPendingMessages > 0;)
{
flushingMessages = true;
getInstance()->runDispatchLoopUntil (10);
}
flushingMessages = true;
if (JUCEApplication::getInstance() != 0) // (must avoid blocking here when running as a plugin)
for (int i = 100; --i >= 0 && numPendingMessages > 0;)
getInstance()->runDispatchLoopUntil (10);
[juceAppDelegate release];
juceAppDelegate = 0;