Improve thread usage

This commit is contained in:
Nova 2025-10-22 03:25:21 +03:30
parent 378d59b045
commit 0c0e8d4031

View File

@ -979,15 +979,10 @@ void MainWindow::prepare_exit()
Configs::dataStore->save_control_no_save = true; // don't change datastore after this line Configs::dataStore->save_control_no_save = true; // don't change datastore after this line
profile_stop(false, true); profile_stop(false, true);
QMutex coreKillMu; runOnThread([=, this]()
coreKillMu.lock();
runOnThread([=, this, &coreKillMu]()
{ {
core_process->Kill(); core_process->Kill();
coreKillMu.unlock(); }, DS_cores, true);
}, DS_cores);
coreKillMu.lock();
coreKillMu.unlock();
mu_exit.unlock(); mu_exit.unlock();
qDebug() << "prepare exit done!"; qDebug() << "prepare exit done!";