[][src]Trait dynpool::SystemWork

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) { ... } }

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.

Associated Types

type Data

Per-worker data. See System::Data.

Loading content...

Required methods

fn init(&self, index: usize) -> Self::Data

Create a new worker. See System::init.

fn work(&self, data: &mut Self::Data) -> Decision

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

Loading content...

Provided methods

fn close(&self, Self::Data)

Consume a closed worker. See System::close.

Loading content...

Implementors

impl<T> SystemWork for T where
    T: System
[src]

type Data = Self::Data

Loading content...