Skip to content
Snippets Groups Projects
Commit 8f99d74c authored by Christoph Kampmeyer's avatar Christoph Kampmeyer
Browse files

CircularDependencyDetector: Avoid deadlock in registerDependencyWait

If a circular dependency was checked and the dependent module was not
yet in the waitMap, the lock was never released.
parent da1b3545
No related branches found
No related tags found
No related merge requests found
......@@ -1328,6 +1328,12 @@ void Application::CircularDependencyDetector::registerDependencyWait(VariableNet
throw ChimeraTK::logic_error("Cirular dependency of ApplicationModules while waiting for initial values");
}
else{
// Give other threads a chance to add to the wait map
lock.unlock();
usleep(10000);
lock.lock();
}
}
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment