9#ifndef STLAB_CONCURRENCY_MAIN_EXECUTOR_HPP
10#define STLAB_CONCURRENCY_MAIN_EXECUTOR_HPP
47#include <stlab/execution/config.hpp>
49#if !STLAB_MAIN_EXECUTOR(NONE)
59#if !STLAB_MAIN_EXECUTOR(NONE)
83 void* source)
noexcept;
102STLAB_EXECUTION_VERSION_NAMESPACE_BEGIN()
112namespace execution_detail {
116#if !STLAB_MAIN_EXECUTOR(NONE)
119struct main_executor_type {
120 using result_type = void;
125 auto operator()(F&& f)
const -> std::enable_if_t<std::is_nothrow_invocable_v<std::decay_t<F>>> {
126 task<void() noexcept> t{std::forward<F>(f)};
128 t.relocation_concept(), t.relocation_invoke(),
129 t.relocation_source());
139#if !STLAB_MAIN_EXECUTOR(NONE)
144inline constexpr auto main_executor = execution_detail::main_executor_type{};
159STLAB_EXECUTION_VERSION_NAMESPACE_END()
Thread-pool executors mapping to the OS scheduler (libdispatch, Windows pool, portable).
void stlab_v2_main_executor_run()
Keeps the main queue serviced; never returns.
void stlab_v2_main_executor_submit(const unsigned char *task_abi_guard, const stlab_v2_task_concept *vtable, stlab_v2_task_proc invoke, void *source) noexcept
Submits one task to the main queue.
void(*)(void *) noexcept stlab_v2_task_proc
Function pointer type submitted through the shared executor ABI.
Definition default_executor.hpp:64
constexpr auto main_executor
Runs void() noexcept tasks on the configured main queue in submission order, except that cooperative ...
Definition main_executor.hpp:144
void main_executor_run()
Keeps the main queue serviced; never returns.
Definition main_executor.hpp:152
Definition default_executor.hpp:50
Definition default_executor.hpp:49
Versioned operation table used to relocate a task target across the shared executor ABI.
Definition task.hpp:64
Move-only callable wrapper for executor scheduling (task<Signature>).