[][src]Trait amadeus_core::pool::ThreadPool

pub trait ThreadPool: Send + Sync + RefUnwindSafe + UnwindSafe + Unpin {
    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 + Send + 'static,
        T: Send + 'static
; }

Required methods

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 + Send + 'static,
    T: Send + 'static, 

Loading content...

Implementations on Foreign Types

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

Loading content...

Implementors

Loading content...