Commit 22f366cb authored by Simon Spannagel's avatar Simon Spannagel
Browse files

ModuleManager: ensure we're not calling ThreadPool::destroy() twice, would end up in resource lock

(cherry picked from commit d2f1bb27)
parent 8b613470
Loading
Loading
Loading
Loading
+5 −3
Original line number Diff line number Diff line
@@ -1019,8 +1019,10 @@ void ModuleManager::finalize() {
 * All modules in the event loop continue to finish the current event
 */
void ModuleManager::terminate() {
    if(!terminate_) {
        terminate_ = true;
        if(thread_pool_) {
            thread_pool_->destroy();
        }
    }
}