pub struct WorkerTask { /* private fields */ }Expand description
A unit of work submitted by the library.
Run it with run, from whatever thread the pool chooses.
Dropping it without running cancels the work — which is safe but will
stall anything waiting on the task’s signal semaphore, so prefer
running it.
Send so it can be moved onto a worker thread; deliberately not Sync,
since it may only be run once.
Implementations§
Source§impl WorkerTask
impl WorkerTask
Trait Implementations§
Auto Trait Implementations§
impl !Sync for WorkerTask
impl Freeze for WorkerTask
impl RefUnwindSafe for WorkerTask
impl Unpin for WorkerTask
impl UnsafeUnpin for WorkerTask
impl UnwindSafe for WorkerTask
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