[−][src]Trait amadeus_core::pool::ProcessPool
Associated Types
type ThreadPool: ThreadPool + 'static
Required methods
fn processes(&self) -> usize
unsafe fn spawn_unchecked<'a, F, Fut, T>(
&self,
work: F
) -> BoxFuture<'a, Result<T, Box<dyn Error + Send>>> where
F: FnOnce(&Self::ThreadPool) -> Fut + ProcessSend + 'a,
Fut: Future<Output = T> + 'a,
T: ProcessSend + 'a,
&self,
work: F
) -> BoxFuture<'a, Result<T, Box<dyn Error + Send>>> where
F: FnOnce(&Self::ThreadPool) -> Fut + ProcessSend + 'a,
Fut: Future<Output = T> + 'a,
T: ProcessSend + 'a,
Safety
Must be polled to completion before dropping. Unsound to forget it without having polled to completion.
Provided methods
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,
&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,
Implementations on Foreign Types
impl<P: ?Sized, '_> ProcessPool for &'_ P where
P: ProcessPool,
[src]
P: ProcessPool,
type ThreadPool = P::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,
unsafe fn spawn_unchecked<'a, F, Fut, T>(
&self,
work: F
) -> BoxFuture<'a, Result<T, Box<dyn Error + Send>>> where
F: FnOnce(&Self::ThreadPool) -> Fut + ProcessSend + 'a,
Fut: Future<Output = T> + 'a,
T: ProcessSend + 'a,
[src]
&self,
work: F
) -> BoxFuture<'a, Result<T, Box<dyn Error + Send>>> where
F: FnOnce(&Self::ThreadPool) -> Fut + ProcessSend + 'a,
Fut: Future<Output = T> + 'a,
T: ProcessSend + 'a,