15 #ifndef CONCEALER__TASK_QUEUE_HPP_
16 #define CONCEALER__TASK_QUEUE_HPP_
29 using Thunk = std::function<void()>;
31 std::queue<Thunk> thunks;
33 mutable std::mutex thunks_mutex;
35 std::thread dispatcher;
37 std::atomic<bool> finalized =
false;
39 std::exception_ptr thrown;
41 auto front()
const -> Thunk;
54 auto lock = std::unique_lock(thunks_mutex);
55 thunks.emplace(std::forward<F>(f));
58 auto empty() const ->
bool;
Definition: task_queue.hpp:28
auto delay(F &&f) -> void
Definition: task_queue.hpp:51
auto empty() const -> bool
Definition: task_queue.cpp:49
TaskQueue()
Definition: task_queue.cpp:22
auto rethrow() const -> void
Definition: task_queue.cpp:67
~TaskQueue()
Definition: task_queue.cpp:41
Definition: autoware_universe.hpp:40