From 0c0e8d4031c9a3b494b6ef5927dc82ceaec211f2 Mon Sep 17 00:00:00 2001 From: Nova Date: Wed, 22 Oct 2025 03:25:21 +0330 Subject: [PATCH] Improve thread usage --- src/ui/mainwindow.cpp | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/src/ui/mainwindow.cpp b/src/ui/mainwindow.cpp index d2621a8..d97a1f5 100644 --- a/src/ui/mainwindow.cpp +++ b/src/ui/mainwindow.cpp @@ -979,15 +979,10 @@ void MainWindow::prepare_exit() Configs::dataStore->save_control_no_save = true; // don't change datastore after this line profile_stop(false, true); - QMutex coreKillMu; - coreKillMu.lock(); - runOnThread([=, this, &coreKillMu]() + runOnThread([=, this]() { core_process->Kill(); - coreKillMu.unlock(); - }, DS_cores); - coreKillMu.lock(); - coreKillMu.unlock(); + }, DS_cores, true); mu_exit.unlock(); qDebug() << "prepare exit done!";