15 #ifndef CONCEALER__TASK_QUEUE_HPP_
16 #define CONCEALER__TASK_QUEUE_HPP_
29 using Thunk = std::function<void()>;
31 std::queue<Thunk> thunks;
33 std::mutex thunks_mutex;
35 std::thread dispatcher;
37 std::atomic<bool> is_stop_requested =
false;
39 std::atomic<bool> is_thrown =
false;
41 std::exception_ptr thrown;
54 std::unique_lock lk(thunks_mutex);
55 thunks.emplace(std::forward<F>(f));
Definition: task_queue.hpp:28
bool exhausted() const noexcept
Definition: task_queue.cpp:56
void stopAndJoin()
Definition: task_queue.cpp:46
TaskQueue()
Definition: task_queue.cpp:22
void rethrow() const
Definition: task_queue.cpp:58
decltype(auto) delay(F &&f)
Definition: task_queue.hpp:51
~TaskQueue()
Definition: task_queue.cpp:54
Definition: autoware.hpp:30