Skip to main content

spawn

Function spawn 

Source
pub fn spawn(vm: &mut Vm, closure: Value) -> u64
Expand description

Starts a fiber running closure on this thread. It first runs when this thread’s main context waits (or when another fiber parks). Returns the fiber id.