fix: 尝试修复死锁问题

This commit is contained in:
MistEO
2023-06-04 18:06:13 +08:00
parent 1aa65c2638
commit e5b5c46bd9

View File

@@ -150,13 +150,13 @@ namespace asst
std::shared_ptr<Controller> m_ctrler = nullptr;
std::shared_ptr<Status> m_status = nullptr;
bool m_thread_exit = false;
std::atomic_bool m_thread_exit = false;
std::list<std::pair<TaskId, std::shared_ptr<InterfaceTask>>> 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;