Function lunatic_process::spawn

source ·
pub fn spawn<T, F, K, R>(
    env: Arc<dyn Environment>,
    func: F
) -> (JoinHandle<Result<T>>, NativeProcess)where
    T: ProcessState + Send + Sync + 'static,
    R: Into<ExecutionResult<T>> + Send + 'static,
    K: Future<Output = R> + Send + 'static,
    F: FnOnce(NativeProcess, MessageMailbox) -> K,
Expand description

Spawns a process from a closure.