[][src]Trait smartpool::PoolBehavior

pub trait PoolBehavior: Sized + Send + Sync + 'static {
    type ChannelKey: Copy + Clone + Send + Sync + 'static;
    fn config(&mut self) -> PoolConfig<Self>;
fn touch_channel<O>(
        &self,
        key: Self::ChannelKey,
        toucher: impl ChannelToucher<O>
    ) -> O;
fn touch_channel_mut<O>(
        &mut self,
        key: Self::ChannelKey,
        toucher: impl ChannelToucherMut<O>
    ) -> O;
fn followup(&self, from: Self::ChannelKey, task: RunningTask); }

A statically dispatched type which serves to configure the behavior of a threadpool.

Associated Types

type ChannelKey: Copy + Clone + Send + Sync + 'static

The identifier for a channel for this pool.

Loading content...

Required methods

fn config(&mut self) -> PoolConfig<Self>

fn touch_channel<O>(
    &self,
    key: Self::ChannelKey,
    toucher: impl ChannelToucher<O>
) -> O

fn touch_channel_mut<O>(
    &mut self,
    key: Self::ChannelKey,
    toucher: impl ChannelToucherMut<O>
) -> O

fn followup(&self, from: Self::ChannelKey, task: RunningTask)

Loading content...

Implementors

Loading content...