From 11e277495f1dd888fba4a35504e1986fa1c42bd8 Mon Sep 17 00:00:00 2001 From: falkTX Date: Mon, 9 Mar 2015 22:51:41 +0100 Subject: [PATCH] testing --- source/utils/CarlaJuceEvents.cpp | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/source/utils/CarlaJuceEvents.cpp b/source/utils/CarlaJuceEvents.cpp index fb9eabd46..7bde97ddc 100644 --- a/source/utils/CarlaJuceEvents.cpp +++ b/source/utils/CarlaJuceEvents.cpp @@ -125,18 +125,23 @@ void MessageManager::doPlatformSpecificInitialisation() { JuceEventsThread& juceEventsThread(getJuceEventsThreadInstance()); - if (! juceEventsThread.isInitializing()) - juceEventsThread.startThread(); + // TESTING + CARLA_SAFE_ASSERT(! juceEventsThread.isInitializing()); + + juceEventsThread.startThread(); + + for (; juceEventsThread.isInitializing();) + carla_msleep(5); } void MessageManager::doPlatformSpecificShutdown() { JuceEventsThread& juceEventsThread(getJuceEventsThreadInstance()); - if (juceEventsThread.isInitializing()) - juceEventsThread.signalThreadShouldExit(); - else - juceEventsThread.stopThread(-1); + // TESTING + CARLA_SAFE_ASSERT(! juceEventsThread.isInitializing()); + + juceEventsThread.stopThread(-1); } bool MessageManager::postMessageToSystemQueue(MessageManager::MessageBase* const message)