mirror of
https://github.com/MaaAssistantArknights/MaaAssistantArknights.git
synced 2026-07-18 02:10:21 +08:00
fix: 修复前一个任务刚完成就停止,UI卡住的问题
This commit is contained in:
@@ -300,6 +300,10 @@ void Assistant::working_proc()
|
||||
const int delay = Configer.get_options().task_delay;
|
||||
lock.lock();
|
||||
m_condvar.wait_for(lock, std::chrono::milliseconds(delay), [&]() -> bool { return m_thread_idle; });
|
||||
|
||||
if (m_thread_idle) {
|
||||
task_callback(AsstMsg::TaskChainStopped, callback_json, this);
|
||||
}
|
||||
}
|
||||
else {
|
||||
m_thread_idle = true;
|
||||
|
||||
Reference in New Issue
Block a user