stlab 2.3.0
Modern, modular C++ algorithms, data structures, and concurrency primitives
Loading...
Searching...
No Matches
executor_base

Detailed Description

Executor type aliases and scheduling helpers.

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 >

Function Documentation

◆ execute_at()

auto stlab::execute_at ( std::chrono::steady_clock::time_point when,
executor_t executor ) -> executor_t
inline