pub struct Threadpool { /* private fields */ }Implementations§
Source§impl Threadpool
impl Threadpool
pub fn new(max_threads: usize) -> Self
pub fn assing<F: Fn() + Send + 'static>( &mut self, f: F, ) -> Result<ThreadId, ThreadingError>
pub fn is_finished(&mut self, th: ThreadId) -> Result<bool, ThreadingError>
Sourcepub fn join(&mut self, th: ThreadId) -> Result<(), ThreadingError>
pub fn join(&mut self, th: ThreadId) -> Result<(), ThreadingError>
!!! Consumes the Input Thread, dont use it after that !!!
pub fn remove(&mut self, th: ThreadId) -> Result<(), ThreadingError>
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Threadpool
impl !RefUnwindSafe for Threadpool
impl Send for Threadpool
impl Sync for Threadpool
impl Unpin for Threadpool
impl !UnwindSafe for Threadpool
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more