[−][src]Struct futures_cputask::ThreadPool
Asynchronous threadpool
Wrapper around a Synchronous threadpool to provide futures support.
Methods
impl<P> ThreadPool<P> where
P: SyncThreadPool + Sized,
[src]
P: SyncThreadPool + Sized,
pub fn from_threadpool(pool: P) -> Self
[src]
Wraps around an existing threadpool instance
pub fn into_inner(self) -> P
[src]
Moves the underlying threadpool out
Trait Implementations
impl<P> AsyncThreadPool for ThreadPool<P> where
P: SyncThreadPool + Sized,
[src]
P: SyncThreadPool + Sized,
fn new() -> Self
[src]
fn with_thread_count(num_threads: usize) -> Self
[src]
fn execute<F, T>(&self, fun: F) -> Pin<Box<dyn Future<Output = T>>> where
F: FnOnce() -> T + Send + 'static,
T: Sized + Send + Sync + 'static,
[src]
F: FnOnce() -> T + Send + 'static,
T: Sized + Send + Sync + 'static,
impl<P> From<P> for ThreadPool<P> where
P: SyncThreadPool + Sized + Eq,
[src]
P: SyncThreadPool + Sized + Eq,
impl<P> Clone for ThreadPool<P> where
P: SyncThreadPool + Sized + Clone,
[src]
P: SyncThreadPool + Sized + Clone,
fn clone(&self) -> Self
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl<P> Eq for ThreadPool<P> where
Self: PartialEq,
P: SyncThreadPool + Sized + Eq,
[src]
Self: PartialEq,
P: SyncThreadPool + Sized + Eq,
impl<P, Rhs> PartialEq<Rhs> for ThreadPool<P> where
P: SyncThreadPool + Sized + PartialEq<Rhs>,
Rhs: ?Sized,
[src]
P: SyncThreadPool + Sized + PartialEq<Rhs>,
Rhs: ?Sized,
impl<P> Debug for ThreadPool<P> where
P: SyncThreadPool + Sized + Debug,
[src]
P: SyncThreadPool + Sized + Debug,
Auto Trait Implementations
impl<P> Send for ThreadPool<P> where
P: Send,
P: Send,
impl<P> Sync for ThreadPool<P> where
P: Send,
P: Send,
impl<P> Unpin for ThreadPool<P> where
P: Unpin,
P: Unpin,
impl<P> UnwindSafe for ThreadPool<P> where
P: UnwindSafe,
P: UnwindSafe,
impl<P> !RefUnwindSafe for ThreadPool<P>
Blanket Implementations
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> From<T> for T
[src]
impl<T> From<!> for T
[src]
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> 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<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,