[][src]Struct amadeus::pool::ProcessPool

pub struct ProcessPool(_);

Implementations

impl ProcessPool[src]

pub fn new(
    processes: Option<usize>,
    tasks_per_core: Option<usize>,
    resources: Resources
) -> Result<Self, SpawnError>
[src]

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

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

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

Trait Implementations

impl Clone for ProcessPool[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 ProcessPool[src]

impl ProcessPool for ProcessPool[src]

type ThreadPool = ThreadPool

impl RefUnwindSafe for ProcessPool[src]

impl UnwindSafe for ProcessPool[src]

Auto Trait Implementations

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<A, B> Downcast<A> for B where
    A: DowncastFrom<B>, 
[src]

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

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

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 where
    T: ?Sized
[src]

impl<T> Type for T[src]

type Meta = Concrete

Type of metadata for type.

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