Skip to main content

run_fork

Function run_fork 

Source
pub fn run_fork<RT, A, E, R, F>(runtime: &RT, f: F) -> FiberHandle<A, E>
where RT: Runtime, A: Clone + Send + Sync + 'static, E: Clone + Send + Sync + 'static, R: 'static, F: FnOnce() -> (Effect<A, E, R>, R) + Send + 'static,
Expand description

Spawn a fiber using runtime (delegates to Runtime::spawn_with).

Pass a Send factory, e.g. || (succeed(42), ()), so the Effect is built on the worker.