mirror of
https://github.com/MaaAssistantArknights/MaaAssistantArknights.git
synced 2026-07-19 10:32:19 +08:00
fix: 修复工作线程标志位判断错误
fix https://github.com/MaaAssistantArknights/MaaAssistantArknights/issues/2460
This commit is contained in:
@@ -266,7 +266,8 @@ void Assistant::working_proc()
|
||||
: (ret ? AsstMsg::TaskChainCompleted : AsstMsg::TaskChainError);
|
||||
task_callback(msg, callback_json, this);
|
||||
|
||||
if (!m_thread_idle) {
|
||||
if (m_thread_idle) {
|
||||
finished_tasks.clear();
|
||||
continue;
|
||||
}
|
||||
|
||||
@@ -276,7 +277,7 @@ void Assistant::working_proc()
|
||||
finished_tasks.clear();
|
||||
}
|
||||
|
||||
auto delay = Configer.get_options().task_delay;
|
||||
const int delay = Configer.get_options().task_delay;
|
||||
lock.lock();
|
||||
m_condvar.wait_for(lock, std::chrono::milliseconds(delay), [&]() -> bool { return m_thread_idle; });
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user