Browse Source

Workaround for mysterious timer message loss on linux.

tags/2021-05-28
jules 12 years ago
parent
commit
a77a671f88
1 changed files with 4 additions and 1 deletions
  1. +4
    -1
      modules/juce_events/timers/juce_Timer.cpp

+ 4
- 1
modules/juce_events/timers/juce_Timer.cpp View File

@@ -83,7 +83,7 @@ public:
when the app has a modal loop), so this is how long to wait before assuming the when the app has a modal loop), so this is how long to wait before assuming the
message has been lost and trying again. message has been lost and trying again.
*/ */
const uint32 messageDeliveryTimeout = now + 2000;
const uint32 messageDeliveryTimeout = now + 300;
while (callbackNeeded.get() != 0) while (callbackNeeded.get() != 0)
{ {
@@ -93,7 +93,10 @@ public:
return; return;
if (Time::getMillisecondCounter() > messageDeliveryTimeout) if (Time::getMillisecondCounter() > messageDeliveryTimeout)
{
messageToSend->post();
break; break;
}
} }
} }
} }


Loading…
Cancel
Save