Struct std::TaskHeader
struct TaskHeader {
int state;
?&TaskHeader next;
struct WakerSlot joiner;
struct Spinlock lock;
}The part of an AsyncTask an executor sees. First field of every AsyncTask, so a ?&TaskHeader and the task have the same address: poll_ and drop_ are AsyncTask<F, T>'s own functions, stored by AsyncTask::new as functions of the header (see std/erased.h).
Fields
ASYNC_TASK_* bits, changed atomically
the executor's list link
a JoinHandle waiting for it
guards 'joiner' and the DONE transition