Browse Source

Cleanup

tags/1.9.8
Filipe Coelho 7 years ago
parent
commit
6480b75f92
1 changed files with 11 additions and 2 deletions
  1. +11
    -2
      source/backend/engine/CarlaEngineInternal.cpp

+ 11
- 2
source/backend/engine/CarlaEngineInternal.cpp View File

@@ -694,7 +694,11 @@ PendingRtEventsRunner::~PendingRtEventsRunner() noexcept
// -----------------------------------------------------------------------
// ScopedActionLock

ScopedActionLock::ScopedActionLock(CarlaEngine* const engine, const EnginePostAction action, const uint pluginId, const uint value, const bool lockWait) noexcept
ScopedActionLock::ScopedActionLock(CarlaEngine* const engine,
const EnginePostAction action,
const uint pluginId,
const uint value,
const bool lockWait) noexcept
: pData(engine->pData)
{
CARLA_SAFE_ASSERT_RETURN(action != kEnginePostActionNull,);
@@ -717,7 +721,12 @@ ScopedActionLock::ScopedActionLock(CarlaEngine* const engine, const EnginePostAc
carla_stdout("ScopedPluginAction(%i) - blocking START", pluginId);

if (! pData->nextAction.postDone)
carla_sem_timedwait(*pData->nextAction.sem, 2000);
{
if (pData->nextAction.sem != nullptr)
carla_sem_timedwait(*pData->nextAction.sem, 2000);
else
carla_sleep(2);
}

carla_stdout("ScopedPluginAction(%i) - blocking DONE", pluginId);



Loading…
Cancel
Save