C/C++ API Reference
Loading...
Searching...
No Matches
pw::async::Task Class Referencefinal

Overview

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
 
Taskoperator= (const Task &)=delete
 
 Task (Task &&)=delete
 
Taskoperator= (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
 

The documentation for this class was generated from the following file: