From a77a671f88b6fd7970e47c8aeef4559da838596a Mon Sep 17 00:00:00 2001 From: jules Date: Thu, 21 Mar 2013 09:50:16 +0000 Subject: [PATCH] Workaround for mysterious timer message loss on linux. --- modules/juce_events/timers/juce_Timer.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/modules/juce_events/timers/juce_Timer.cpp b/modules/juce_events/timers/juce_Timer.cpp index fdfa34442f..4535fb664e 100644 --- a/modules/juce_events/timers/juce_Timer.cpp +++ b/modules/juce_events/timers/juce_Timer.cpp @@ -83,7 +83,7 @@ public: when the app has a modal loop), so this is how long to wait before assuming the message has been lost and trying again. */ - const uint32 messageDeliveryTimeout = now + 2000; + const uint32 messageDeliveryTimeout = now + 300; while (callbackNeeded.get() != 0) { @@ -93,7 +93,10 @@ public: return; if (Time::getMillisecondCounter() > messageDeliveryTimeout) + { + messageToSend->post(); break; + } } } }