run

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

Runs root_task and every task it spawns in a nested cooperative scope.

The scheduler intercepts yield, channel waits, timers, and nested spawns; ordinary host effects continue to the enclosing program fallbacks. It returns only after the complete spawned task tree finishes. If every task is blocked, the worker parks until a registered channel or timer can make progress.

View Source
pub func run(consume root_task: Task) -> () {
	_run_cooperative(root_task: root_task)
}