Skip to main content

blocking_io

Function blocking_io 

Source
pub fn blocking_io<R: Send>(vm: &mut Vm, f: impl FnOnce() -> R + Send) -> R
Expand description

Runs a blocking call that does not touch the heap. In a fiber (or a main context that has fibers) it runs on the I/O pool while other fibers run; otherwise the thread blocks in the native state, as crate::blocking does.