_run_cooperative

func _run_cooperative(consume root_task: Task) -> ()

Runs one scheduler root and its complete spawned task tree on this worker.

root_task is a role within this scheduler scope, not necessarily the program's main task. Ready tasks advance cooperatively; when all tasks wait, every channel or timer interest is registered before the worker parks to avoid lost wakes.

View Source
pub func _run_cooperative(consume root_task: Task) -> () {
	match _drive_task(task: root_task) {
		.finished -> (),
		first -> _drain_cooperative(first: first)
	}
}