Cleanup related fixes
Signed-off-by: falkTX <falktx@falktx.com>
This commit is contained in:
parent
10330964ea
commit
3046133883
5 changed files with 111 additions and 3 deletions
|
|
@ -79,6 +79,7 @@ struct Engine::Internal {
|
|||
int64_t blockFrame = 0;
|
||||
double blockTime = 0.0;
|
||||
int blockFrames = 0;
|
||||
bool aboutToClose = false;
|
||||
|
||||
#ifndef HEADLESS
|
||||
// Meter
|
||||
|
|
@ -776,6 +777,8 @@ void Engine::prepareSaveModule(Module* module) {
|
|||
|
||||
|
||||
void Engine::prepareSave() {
|
||||
if (internal->aboutToClose)
|
||||
return;
|
||||
SharedLock<SharedMutex> lock(internal->mutex);
|
||||
for (Module* module : internal->modules) {
|
||||
Module::SaveEvent e;
|
||||
|
|
@ -1175,5 +1178,10 @@ void Engine::startFallbackThread() {
|
|||
}
|
||||
|
||||
|
||||
void Engine_setAboutToClose(Engine* const engine) {
|
||||
engine->internal->aboutToClose = true;
|
||||
}
|
||||
|
||||
|
||||
} // namespace engine
|
||||
} // namespace rack
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue