[][src]Function constellation::spawn

pub async fn spawn<T: FnOnce(Pid) + Serialize + DeserializeOwned>(
    resources: Resources,
    start: T
) -> Result<Pid, SpawnError>

Spawn a new process.

spawn() takes 2 arguments:

  • resources: memory and CPU resource requirements of the new process
  • start: the closure to be run in the new process

spawn() on success returns the Pid of the new process.