Browse Source

Make Engine_updateExpander() non-locking.

tags/v2.0.0
Andrew Belt 2 years ago
parent
commit
0bdebebfae
1 changed files with 4 additions and 4 deletions
  1. +4
    -4
      src/engine/Engine.cpp

+ 4
- 4
src/engine/Engine.cpp View File

@@ -289,13 +289,13 @@ struct Engine::Internal {
};


static void Engine_updateExpander(Engine* that, Module* module, bool side) {
static void Engine_updateExpander_NoLock(Engine* that, Module* module, bool side) {
Module::Expander& expander = side ? module->rightExpander : module->leftExpander;
Module* oldExpanderModule = expander.module;

if (expander.moduleId >= 0) {
if (!expander.module || expander.module->id != expander.moduleId) {
expander.module = that->getModule(expander.moduleId);
expander.module = that->getModule_NoLock(expander.moduleId);
}
}
else {
@@ -592,8 +592,8 @@ void Engine::stepBlock(int frames) {

// Update expander pointers
for (Module* module : internal->modules) {
Engine_updateExpander(this, module, false);
Engine_updateExpander(this, module, true);
Engine_updateExpander_NoLock(this, module, false);
Engine_updateExpander_NoLock(this, module, true);
}

// Launch workers


Loading…
Cancel
Save