Skip to main content

spawn

Function spawn 

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

Starts a fiber running closure on this thread, recording its id in handle (a Fiber). It first runs when this thread’s main context waits (or when another fiber parks).