Crate mitosis[][src]

Expand description

This crate provides the ability to spawn processes with a function similar to thread::spawn

To use this crate, call mitosis::init() at the beginning of your main(), and then anywhere in your program you may call mitosis::spawn():

let data = vec![1, 2, 3, 4];
mitosis::spawn(data, |data| {
    // This will run in a separate process
    println!("Received data {:?}", data);
});

mitosis::spawn() can pass arbitrary serializable data, including IPC senders and receivers from the ipc-channel crate, down to the new process.

Structs

This value is returned by mitosis::spawn and lets you wait on the result of the child process’ computation

Functions

Initialize mitosis

Initialize mitosis within a #[test]. You need to also have

Spawn a new process to run a function with some payload