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.
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 | |
| Task & | operator= (const Task &)=delete |
| Task & | operator= (Task &&)=delete |
| virtual | ~Task ()=default |
| Poll | Pend (Context &cx) |
| bool | IsRegistered () const |
| void | Deregister () |