[][src]Trait amadeus_core::pool::ProcessPool

pub trait ProcessPool: Clone + Send + Sync + RefUnwindSafe + UnwindSafe + Unpin {
    type ThreadPool: ThreadPool + 'static;
    fn processes(&self) -> usize;
fn spawn<F, Fut, T>(
        &self,
        work: F
    ) -> BoxFuture<'static, Result<T, Box<dyn Error + Send>>>
    where
        F: FnOnce(&Self::ThreadPool) -> Fut + ProcessSend + 'static,
        Fut: Future<Output = T> + 'static,
        T: ProcessSend + 'static
; }

Associated Types

type ThreadPool: ThreadPool + 'static

Loading content...

Required methods

fn processes(&self) -> usize

fn spawn<F, Fut, T>(
    &self,
    work: F
) -> BoxFuture<'static, Result<T, Box<dyn Error + Send>>> where
    F: FnOnce(&Self::ThreadPool) -> Fut + ProcessSend + 'static,
    Fut: Future<Output = T> + 'static,
    T: ProcessSend + 'static, 

Loading content...

Implementations on Foreign Types

impl<'_, P: ?Sized> ProcessPool for &'_ P where
    P: ProcessPool
[src]

type ThreadPool = P::ThreadPool

Loading content...

Implementors

Loading content...