Trait smartpool::PoolBehavior
source · 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);
}Expand description
A statically dispatched type which serves to configure the behavior of a threadpool.