C/C++ API Reference
Loading...
Searching...
No Matches
pw::async2::OwnedTask Class Referenceabstract

Overview

A Task that the Dispatcher takes ownership of when it is posted.

OwnedTask adds a virtual DoDestroy() function. This function is called by the dispatcher after the task completes. DoDestroy() must destroy the task and deallocate its memory.

After it is posted to a dispatcher, an OwnedTask may only be accessed from the dispatcher via the Task::DoPend() implementation.

Inheritance diagram for pw::async2::OwnedTask:
pw::async2::Task pw::containers::future::IntrusiveList< T >::Item pw::async2::internal::AllocatedTask< Pendable > pw::async2::internal::RunHeapFuncTask< Func >

Protected Member Functions

constexpr OwnedTask (log::Token name=kDefaultName)
 
- Protected Member Functions inherited from pw::containers::future::IntrusiveList< T >::Item
constexpr Item ()=default
 

Private Member Functions

virtual void DoDestroy ()=0
 

Additional Inherited Members

- Public Member Functions inherited from pw::async2::Task
constexpr Task (log::Token name=kDefaultName)
 
 Task (const Task &)=delete
 
 Task (Task &&)=delete
 
Taskoperator= (const Task &)=delete
 
Taskoperator= (Task &&)=delete
 
virtual ~Task ()=default
 
Poll Pend (Context &cx)
 
bool IsRegistered () const
 
void Deregister ()
 

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