A Task
represents a unit of work (TaskFunction
) that can be executed on a Dispatcher
. To support various Dispatcher
backends, it wraps a backend::NativeTask
, which contains backend-specific state and methods.
Public Member Functions | |
Task () | |
Task (TaskFunction &&f) | |
Constructs a Task that calls f when executed on a Dispatcher . | |
Task (const Task &)=delete | |
Task & | operator= (const Task &)=delete |
Task (Task &&)=delete | |
Task & | operator= (Task &&)=delete |
void | set_function (TaskFunction &&f) |
void | operator() (Context &ctx, Status status) |
Executes this task. | |
backend::NativeTask & | native_type () |
const backend::NativeTask & | native_type () const |