Trait marid::Process [] [src]

pub trait Process {
    type Error;
    fn ready(&self) -> Result<(), Self::Error>;
    fn wait(&self) -> Result<(), Self::Error>;
    fn signal(&self, signal: Signal);
}

A Process represents are running unit of work. It can be signaled and waited on.

Associated Types

type Error

Error type for the Process.

Required Methods

fn ready(&self) -> Result<(), Self::Error>

This function will block until the running Process has finished its setup and is ready to run.

fn wait(&self) -> Result<(), Self::Error>

This function will wait until the Process has exited, returning a success or failure.

fn signal(&self, signal: Signal)

This function will signal the running Process with the specified signal.

Warnings

This must be a non-blocking function.

Implementors