Trait dynpool::SystemWork

source ·
pub trait SystemWork: Sync + Send + 'static {
    type Data;

    fn init(&self, index: usize) -> Self::Data;
    fn work(&self, data: &mut Self::Data) -> Decision;

    fn close(&self, : Self::Data) { ... }
}
Expand description

A subset of System that can perform work, but my not provide scale. Should be implemented by the user or created by functions such as func_worker.

Required Associated Types

Per-worker data. See System::Data.

Required Methods

Create a new worker. See System::init.

Do a unit of work, and return scheduling information. See System::work.

Provided Methods

Consume a closed worker. See System::close.

Implementors