[−][src]Struct fast_threadpool::ThreadPoolSyncHandler
Synchronous handler to execute jobs on the thread pool
Implementations
impl<Shared: 'static + Clone + Send> ThreadPoolSyncHandler<Shared>
[src]
pub fn execute<F, R>(&self, f: F) -> Result<R, ThreadPoolDisconnected> where
F: 'static + Send + FnOnce(&Shared) -> R,
R: 'static + Send,
[src]
F: 'static + Send + FnOnce(&Shared) -> R,
R: 'static + Send,
Execute the given job and block the current thread until finished.
If you need a non blocking method, see ThreadPoolAsyncHandler
.
pub fn launch<F, R>(
&self,
f: F
) -> Result<JoinHandle<R>, ThreadPoolDisconnected> where
F: 'static + Send + FnOnce(&Shared) -> R,
R: 'static + Send,
[src]
&self,
f: F
) -> Result<JoinHandle<R>, ThreadPoolDisconnected> where
F: 'static + Send + FnOnce(&Shared) -> R,
R: 'static + Send,
Launch the given job and return a oneshot receiver that listen job result.
If you need a non blocking method, see ThreadPoolAsyncHandler
.
Trait Implementations
impl<Shared: Clone + 'static + Send> Clone for ThreadPoolSyncHandler<Shared>
[src]
pub fn clone(&self) -> ThreadPoolSyncHandler<Shared>
[src]
pub fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl<Shared: Debug + 'static + Clone + Send> Debug for ThreadPoolSyncHandler<Shared>
[src]
Auto Trait Implementations
impl<Shared> RefUnwindSafe for ThreadPoolSyncHandler<Shared>
[src]
impl<Shared> Send for ThreadPoolSyncHandler<Shared>
[src]
impl<Shared> Sync for ThreadPoolSyncHandler<Shared>
[src]
impl<Shared> Unpin for ThreadPoolSyncHandler<Shared>
[src]
impl<Shared> UnwindSafe for ThreadPoolSyncHandler<Shared>
[src]
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,
pub fn borrow_mut(&mut self) -> &mut T
[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> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub 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.
pub 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>,