[−][src]Crate mitosis
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
JoinHandle | This value is returned by |
Functions
init | Initialize mitosis |
spawn | Spawn a new process to run a function with some payload |