|
stlab 2.3.0
Modern, modular C++ algorithms, data structures, and concurrency primitives
|
Executor type aliases and scheduling helpers. More...
#include <stlab/config.hpp>#include <chrono>#include <functional>#include <stlab/concurrency/system_timer.hpp>#include <stlab/concurrency/task.hpp>Go to the source code of this file.
Classes | |
| struct | stlab::executor |
| Wraps an executor_t for use with operator&. More... | |
| struct | stlab::executor_task_pair< F > |
| Executor plus callable, produced by executor & f (used by futures and channels). More... | |
Typedefs | |
| using | stlab::executor_t |
| Type-erased executor: accepts a void() noexcept task. | |
Functions | |
| template<typename Rep, typename Per = std::ratio<1>> | |
| auto | stlab::execute_at (std::chrono::duration< Rep, Per > duration, executor_t executor) -> executor_t |
| Returns an executor that posts tasks to executor after duration (immediate if zero). | |
| auto | stlab::execute_at (std::chrono::steady_clock::time_point when, executor_t executor) -> executor_t |
| template<typename E, typename Rep, typename Per = std::ratio<1>> | |
| auto | stlab::execute_delayed (std::chrono::duration< Rep, Per > duration, E executor) |
| Returns an executor that delays each submitted task by duration before forwarding to executor. | |
| template<typename F> | |
| auto | stlab::operator& (executor e, F &&f) -> executor_task_pair< F > |
| template<typename F> | |
| auto | stlab::operator& (F &&f, executor e) -> executor_task_pair< F > |
Executor type aliases and scheduling helpers.
executor_t is std::function<void(task<void() noexcept>&&)>. execute_at and execute_delayed wrap an executor to post work after a duration (or deprecated time point). operator& combines an executor with a callable into executor_task_pair for future::then and channel attachment.