Trait xstream_util::Pool

source ·
pub trait Pool {
    // Required methods
    fn get(&mut self) -> Result<&mut Child, Error>;
    fn join(&mut self) -> Result<(), Error>;
}
Expand description

A type that can get child processes on demand

Required Methods§

source

fn get(&mut self) -> Result<&mut Child, Error>

Fetch a process from the pool

Depending on the type of Pool, this may spawn a new process or just return one that is already running.

Errors

When anything goes wrong when trying to create a new process.

source

fn join(&mut self) -> Result<(), Error>

Wait for all spawned processes to complete successfully

Errors

When anything goes wrong when waiting for a process, including non-zero exit codes.

Implementors§