diff --git a/modules/juce_core/native/juce_posix_SharedCode.h b/modules/juce_core/native/juce_posix_SharedCode.h index 5dd2888d4f..a73eb5c8f1 100644 --- a/modules/juce_core/native/juce_posix_SharedCode.h +++ b/modules/juce_core/native/juce_posix_SharedCode.h @@ -1252,10 +1252,13 @@ struct HighResolutionTimer::Pimpl { if (thread != 0) { - shouldStop = true; - while (thread != 0 && thread != pthread_self()) + { + // if the timer callback itself calls startTimer then we need + // to override this + shouldStop = true; Thread::yield(); + } } }