std :: sync::task
Struct std::Task
struct Task {
int state;
int resume_point;
int blocked;
int wait_fd;
int wait_filter;
}Fields
TASK_READY, TASK_RUNNING, or TASK_DONE
where to resume (0 = start)
I/O-readiness blocking (std/sched/reactor.h drives these): a task blocks itself by calling TaskScheduler::await_fd(fd, filter) from within its own function body (self.current identifies it while running) before returning its yield value. tick() then skips it entirely — no re-invocation, no busy-polling — until something calls unblock_fd() with a matching (fd, filter), normally the reactor reporting that fd became ready.
0 = runnable, 1 = blocked awaiting I/O
fd (or signal number) this task is waiting on
SCHED_READ / SCHED_WRITE / SCHED_SIGNAL (see reactor.h)