|
stlab 2.3.0
Modern, modular C++ algorithms, data structures, and concurrency primitives
|
Executor wrapper that runs enqueued tasks serially on top of e. More...
#include <serial_queue.hpp>
Public Member Functions | |
| template<typename Executor> | |
| serial_queue_t (Executor e, schedule_mode mode=schedule_mode::single) | |
| Constructs a serial queue using underlying executor e and drain mode mode. | |
| auto | executor () const |
| Returns an executor that enqueues void() noexcept tasks on this queue. | |
| template<typename F, typename... Args> | |
| auto | operator() (F &&f, Args &&... args) const |
| Schedules f(args...) on this queue via async and returns the resulting future. | |
Executor wrapper that runs enqueued tasks serially on top of e.
|
inlinenodiscard |
Returns an executor that enqueues void() noexcept tasks on this queue.
Like other executors, operator() returns void — tasks are not cancelable and no future carries their result. Suitable for fire-and-forget work on the serial context.
|
inline |