[−][src]Struct amadeus::pool::ProcessPool
Implementations
impl ProcessPool
[src]
pub fn new(
processes: Option<usize>,
tasks_per_core: Option<usize>,
resources: Resources
) -> Result<Self, SpawnError>
[src]
processes: Option<usize>,
tasks_per_core: Option<usize>,
resources: Resources
) -> Result<Self, SpawnError>
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]
&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,
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.
fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl Debug for ProcessPool
[src]
impl ProcessPool for ProcessPool
[src]
type ThreadPool = ThreadPool
fn processes(&self) -> usize
[src]
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,
[src]
&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,
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]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<A, B> Downcast<A> for B where
A: DowncastFrom<B>,
[src]
A: DowncastFrom<B>,
fn downcast(self) -> Result<A, DowncastError>
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> Same<T> for T
type Output = T
Should always be Self
impl<T> Sealed<T> for T where
T: ?Sized,
T: ?Sized,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> Type for T where
T: ?Sized,
[src]
T: ?Sized,
default fn meta(self: *const T) -> <T as Type>::Meta
[src]
default fn data(self: *const T) -> *const ()
[src]
default fn data_mut(self: *mut T) -> *mut ()
[src]
default fn dangling(t: <T as Type>::Meta) -> NonNull<T>
[src]
default fn fatten(thin: *mut (), t: <T as Type>::Meta) -> *mut T
[src]
const METATYPE: MetaType
[src]
type Meta: 'static
fn meta_type(self: *const Self) -> MetaType
[src]
impl<T> Type for T
[src]
const METATYPE: MetaType
[src]
type Meta = Concrete
Type of metadata for type.
fn meta(self: *const T) -> <T as Type>::Meta
[src]
fn data(self: *const T) -> *const ()
[src]
fn data_mut(self: *mut T) -> *mut ()
[src]
fn dangling(_t: <T as Type>::Meta) -> NonNull<T>
[src]
fn fatten(thin: *mut (), _t: <T as Type>::Meta) -> *mut T
[src]
fn meta_type(self: *const Self) -> MetaType
[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,