[−][src]Trait amadeus_core::pool::ThreadPool
Required methods
fn threads(&self) -> usize
unsafe fn spawn_unchecked<'a, F, Fut, T>(
&self,
work: F
) -> BoxFuture<'a, Result<T, Box<dyn Error + Send>>> where
F: FnOnce() -> Fut + Send + 'a,
Fut: Future<Output = T> + 'a,
T: Send + 'a,
&self,
work: F
) -> BoxFuture<'a, Result<T, Box<dyn Error + Send>>> where
F: FnOnce() -> Fut + Send + 'a,
Fut: Future<Output = T> + 'a,
T: Send + '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() -> Fut + Send + 'static,
Fut: Future<Output = T> + 'static,
T: Send + 'static,
&self,
work: F
) -> BoxFuture<'static, Result<T, Box<dyn Error + Send>>> where
F: FnOnce() -> Fut + Send + 'static,
Fut: Future<Output = T> + 'static,
T: Send + 'static,
Implementations on Foreign Types
impl<P: ?Sized, '_> ThreadPool for &'_ P where
P: ThreadPool,
[src]
P: ThreadPool,
fn threads(&self) -> usize
[src]
fn spawn<F, Fut, T>(
&self,
work: F
) -> BoxFuture<'static, Result<T, Box<dyn Error + Send>>> where
F: FnOnce() -> Fut + Send + 'static,
Fut: Future<Output = T> + 'static,
T: Send + 'static,
[src]
&self,
work: F
) -> BoxFuture<'static, Result<T, Box<dyn Error + Send>>> where
F: FnOnce() -> Fut + Send + 'static,
Fut: Future<Output = T> + 'static,
T: Send + 'static,
unsafe fn spawn_unchecked<'a, F, Fut, T>(
&self,
work: F
) -> BoxFuture<'a, Result<T, Box<dyn Error + Send>>> where
F: FnOnce() -> Fut + Send + 'a,
Fut: Future<Output = T> + 'a,
T: Send + 'a,
[src]
&self,
work: F
) -> BoxFuture<'a, Result<T, Box<dyn Error + Send>>> where
F: FnOnce() -> Fut + Send + 'a,
Fut: Future<Output = T> + 'a,
T: Send + 'a,