std1.0.0-beta-7 SafeC docs

std :: sched::reactor

Function std::reactor_run

#include <std/sched/reactor.h> source · definition

void reactor_run(&TaskScheduler sched, &Reactor r)

Drives 'sched' to completion: repeatedly ticks every runnable task, and whenever none are immediately runnable, polls the reactor — with a zero timeout if some tasks are merely mid-round (so newly-ready I/O is picked up without stalling), or an indefinite wait if literally everything remaining is blocked on I/O, so the process consumes zero CPU until the OS actually has something to report. This is the scheduler itself: replaces TaskScheduler::run_all() for any workload where tasks call await_fd().