threadman 0.1.0
Header-only C++23 managed threads, dynamic pools, futures, and executors
Loading...
Searching...
No Matches
threadman::Executor Concept Reference

Duck-typed alternative to IExecutor for templated code that wants to avoid a virtual call. More...

#include <executor.hpp>

Concept definition

template<class E>
concept threadman::Executor = requires(E& e, std::function<void()> f) {
{ e.execute(std::move(f)) } -> std::same_as<void>;
}
Duck-typed alternative to IExecutor for templated code that wants to avoid a virtual call.
Definition executor.hpp:40

Detailed Description

Duck-typed alternative to IExecutor for templated code that wants to avoid a virtual call.

Anything with an execute(std::function<void()>) method satisfies it; IExecutor does too.