pub struct TaskInFlight { /* private fields */ }
Expand description
Packets sent between threads to coordinate a ThreadPool
.
Implementations§
Source§impl TaskInFlight
impl TaskInFlight
Sourcepub fn run(&mut self) -> bool
pub fn run(&mut self) -> bool
Process the task in this container. Returns false if the task has already been ran, in which case this function does nothing.
Sourcepub fn signal_panic(&mut self)
pub fn signal_panic(&mut self)
Signals the thread pool that the thread responsible for running this task panicked. This can be used to propagate the panic to the main thread.
Trait Implementations§
impl Sync for TaskInFlight
Auto Trait Implementations§
impl Freeze for TaskInFlight
impl RefUnwindSafe for TaskInFlight
impl !Send for TaskInFlight
impl Unpin for TaskInFlight
impl UnwindSafe for TaskInFlight
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