From e5b5c46bd9bb983510070a044ca5312460e1cf20 Mon Sep 17 00:00:00 2001 From: MistEO Date: Sun, 4 Jun 2023 18:06:13 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E5=B0=9D=E8=AF=95=E4=BF=AE=E5=A4=8D?= =?UTF-8?q?=E6=AD=BB=E9=94=81=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/MaaCore/Assistant.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/MaaCore/Assistant.h b/src/MaaCore/Assistant.h index 84686e0352..eae4db47b6 100644 --- a/src/MaaCore/Assistant.h +++ b/src/MaaCore/Assistant.h @@ -150,13 +150,13 @@ namespace asst std::shared_ptr m_ctrler = nullptr; std::shared_ptr m_status = nullptr; - bool m_thread_exit = false; + std::atomic_bool m_thread_exit = false; std::list>> m_tasks_list; inline static TaskId m_task_id = 0; // 进程级唯一 ApiCallback m_callback = nullptr; void* m_callback_arg = nullptr; - bool m_thread_idle = true; + std::atomic_bool m_thread_idle = true; mutable std::mutex m_mutex; std::condition_variable m_condvar;