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

pub trait ProcessPool: Send + Sync + RefUnwindSafe + UnwindSafe + Unpin {
    fn processes(&self) -> usize;
fn threads(&self) -> usize;
fn spawn<F, T>(
        &self,
        work: F
    ) -> Pin<Box<dyn Future<Output = Result<T, Box<dyn Error + Send>>> + Send>>
    where
        F: FnOnce() -> T + ProcessSend,
        T: ProcessSend
; }

Required methods

fn processes(&self) -> usize

fn threads(&self) -> usize

fn spawn<F, T>(
    &self,
    work: F
) -> Pin<Box<dyn Future<Output = Result<T, Box<dyn Error + Send>>> + Send>> where
    F: FnOnce() -> T + ProcessSend,
    T: ProcessSend

Loading content...

Implementations on Foreign Types

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

Loading content...

Implementors

Loading content...