[][src]Struct amadeus::pool::ThreadPool

pub struct ThreadPool(_);

Implementations

impl ThreadPool[src]

pub fn new(tasks_per_core: Option<usize>) -> Result<Self>[src]

pub fn threads(&self) -> usize[src]

pub fn spawn<F, Fut, T>(
    &self,
    work: F
) -> impl Future<Output = Result<T, Panicked>> + Send where
    F: FnOnce() -> Fut + Send + 'static,
    Fut: Future<Output = T> + 'static,
    T: Send + 'static, 
[src]

Trait Implementations

impl Clone for ThreadPool[src]

fn clone(&self) -> Self[src]

Cloning a pool will create a new handle to the pool. The behavior is similar to Arc.

We could for example submit jobs from multiple threads concurrently.

impl Debug for ThreadPool[src]

impl ProcessPool for ThreadPool[src]

type ThreadPool = Self

impl RefUnwindSafe for ThreadPool[src]

impl ThreadPool for ThreadPool[src]

impl UnwindSafe for ThreadPool[src]

Auto Trait Implementations

impl Send for ThreadPool

impl Sync for ThreadPool

impl Unpin for ThreadPool

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T, U> Cast<U> for T where
    U: FromCast<T>, 

impl<A, B> Downcast<A> for B where
    A: DowncastFrom<B>, 
[src]

impl<T> From<T> for T[src]

impl<T> FromBits<T> for T

impl<T> FromCast<T> for T

impl<T> IntersectPlusUnionIsPlus for T where
    T: ?Sized
[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> IntoBits<U> for T where
    U: FromBits<T>, 

impl<T> Same<T> for T

type Output = T

Should always be Self

impl<T> Sealed<T> for T where
    T: ?Sized

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> Type for T[src]

type Meta = Concrete

Type of metadata for type.

impl<T> Type for T where
    T: ?Sized
[src]

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,