[−][src]Struct futures::executor::ThreadPool
A general-purpose thread pool for scheduling tasks that poll futures to completion.
The thread pool multiplexes any number of tasks onto a fixed number of worker threads.
This type is a clonable handle to the threadpool itself. Cloning it will only create a new reference, not a new threadpool.
Methods
impl ThreadPool
[src][−]
pub fn new() -> Result<ThreadPool, Error>
[src][+]
pub fn builder() -> ThreadPoolBuilder
[src][+]
pub fn run<F>(&mut self, f: F) -> <F as Future>::Output where
F: Future,
[src][+]
F: Future,
Trait Implementations
impl<'_> Spawn for &'_ ThreadPool
[src][+]
impl Spawn for ThreadPool
[src][+]
impl Drop for ThreadPool
[src][+]
impl Clone for ThreadPool
[src][+]
impl Debug for ThreadPool
[src][+]
Auto Trait Implementations
impl Send for ThreadPool
impl Sync for ThreadPool
Blanket Implementations
impl<T> From for T
[src][+]
impl<T, U> Into for T where
U: From<T>,
[src][+]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src][+]
T: Clone,
impl<T, U> TryFrom for T where
U: Into<T>,
[src][+]
U: Into<T>,
impl<T> Borrow for T where
T: ?Sized,
[src][+]
T: ?Sized,
impl<T> Any for T where
T: 'static + ?Sized,
[src][+]
T: 'static + ?Sized,
impl<T> BorrowMut for T where
T: ?Sized,
[src][+]
T: ?Sized,
impl<T, U> TryInto for T where
U: TryFrom<T>,
[src][+]
U: TryFrom<T>,
impl<Sp> SpawnExt for Sp where
Sp: Spawn + ?Sized,
[src][+]
Sp: Spawn + ?Sized,