16#include "pw_allocator/allocator.h"
17#include "pw_async2/dispatcher.h"
22template <
typename Pendable>
25 template <
typename... Args>
26 AllocatedTask(pw::allocator::Deallocator& deallocator, Args&&... args)
27 : deallocator_(deallocator), pendable_(std::forward<Args>(args)...) {}
32 void DoDestroy() final { deallocator_.Delete(
this); }
34 pw::allocator::Deallocator& deallocator_;
48template <
typename Pendable>
51 allocator, std::forward<Pendable>(pendable));
60template <
typename Pendable,
typename... Args>
63 allocator, std::forward<Args>(args)...);
Definition: allocator.h:36
std::enable_if_t<!std::is_array_v< T >, T * > New(Args &&... args)
Definition: allocator.h:57
Definition: allocate_task.h:23
Poll DoPend(Context &cx) final
Definition: allocate_task.h:30
void DoDestroy() final
Definition: allocate_task.h:32
Task * AllocateTask(pw::allocator::Allocator &allocator, Pendable &&pendable)
Definition: allocate_task.h:49