|
stlab 2.3.0
Modern, modular C++ algorithms, data structures, and concurrency primitives
|
Serial executor and scheduling modes built on futures. More...
#include <stlab/config.hpp>#include <cstdint>#include <deque>#include <mutex>#include <type_traits>#include <utility>#include <stlab/scope.hpp>#include <stlab/concurrency/future.hpp>#include <stlab/concurrency/task.hpp>Go to the source code of this file.
Classes | |
| class | stlab::serial_queue_t |
| Executor wrapper that runs enqueued tasks serially on top of e. More... | |
Macros | |
| #define | STLAB_DISABLE_FUTURE_COROUTINES() |
Enumerations | |
| enum class | stlab::schedule_mode : std::uint8_t { stlab::schedule_mode::single , stlab::schedule_mode::all } |
| How the serial queue drains its task deque when kicked. More... | |
Serial executor and scheduling modes built on futures.
serial_queue_t wraps an underlying executor so tasks run one-at-a-time (or in queued batches, depending on schedule_mode). Use executor() for fire-and-forget work; use operator() to schedule via async and obtain a future for the result.