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;
43 std::atomic<bool> is_exhausted =
true;
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:53
TaskQueue()
Definition: task_queue.cpp:22
void rethrow() const
Definition: task_queue.cpp:55
decltype(auto) delay(F &&f)
Definition: task_queue.hpp:51
~TaskQueue()
Definition: task_queue.cpp:45
Definition: autoware_universe.hpp:40