36 "Threading Issue detected: " << err,
84 explicit WorkerThread(std::function<
void(std::atomic<bool>&)> do_work);
90 void start_working_thread(
const std::string& name =
"noname");
97 void stop_working_thread();
103 bool thread_running()
const {
return m_thread_running.load(); }
105 WorkerThread(
const WorkerThread&) =
delete;
106 WorkerThread& operator=(
const WorkerThread&) =
delete;
107 WorkerThread(WorkerThread&&) =
delete;
108 WorkerThread& operator=(WorkerThread&&) =
delete;
111 std::atomic<bool> m_thread_running;
112 std::unique_ptr<std::thread> m_working_thread;
113 std::function<void(std::atomic<bool>&)> m_do_work;