[][src]Trait smartpool::channel::Channel

pub trait Channel {
    fn assign_bits(
        &mut self,
        assigner: &mut BitAssigner
    ) -> Result<(), NotEnoughBits>;
fn poll(&self) -> Option<RunningTask>; fn into_shared(self) -> Arc<RwLock<Self>>
    where
        Self: Sized
, { ... } }

A channel by which futures becomes available to the thread pool.

Required methods

fn assign_bits(
    &mut self,
    assigner: &mut BitAssigner
) -> Result<(), NotEnoughBits>

fn poll(&self) -> Option<RunningTask>

Loading content...

Provided methods

fn into_shared(self) -> Arc<RwLock<Self>> where
    Self: Sized

Wrap self in a reference counted read/write lock, which is still a channel, and can have shared ownership, allowing it to be used in a scheduler.

Loading content...

Implementations on Foreign Types

impl<C: Channel> Channel for Arc<RwLock<C>>[src]

Shared channel implementation.

fn into_shared(self) -> Arc<RwLock<Self>> where
    Self: Sized
[src]

Loading content...

Implementors

impl Channel for ShortestDeadlineFirst[src]

fn into_shared(self) -> Arc<RwLock<Self>> where
    Self: Sized
[src]

impl Channel for VecDequeChannel[src]

fn into_shared(self) -> Arc<RwLock<Self>> where
    Self: Sized
[src]

impl<Inner: Channel> Channel for MultiChannel<Inner>[src]

fn into_shared(self) -> Arc<RwLock<Self>> where
    Self: Sized
[src]

Loading content...