pub struct Running { /* private fields */ }Expand description
A worker running on a thread of its own, from Worker::spawn.
running.stop();
let report = running.join()?;Implementations§
Source§impl Running
impl Running
Sourcepub fn stop(&self)
pub fn stop(&self)
Ask the worker to stop; see Stopper::stop.
running.stop();Sourcepub fn stopper(&self) -> Stopper
pub fn stopper(&self) -> Stopper
The handle that stops the worker.
let stopper = running.stopper();Sourcepub fn is_finished(&self) -> bool
pub fn is_finished(&self) -> bool
Whether the worker has stopped, so Running::join won’t wait.
if running.is_finished() { /* join */ }Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for Running
impl !UnwindSafe for Running
impl Forget for Running
impl Freeze for Runningwhere
*const ArcInner<Control> is !null: Freeze,
PhantomData<ArcInner<Control>>: Freeze,
*const ArcInner<Inner> is !null: Freeze,
PhantomData<ArcInner<Inner>>: Freeze,
*const ArcInner<Packet<'static, Result<Report, Error>>> is !null: Freeze,
PhantomData<ArcInner<Packet<'static, Result<Report, Error>>>>: Freeze,
impl Move for Running
impl Send for Running
impl Sync for Running
impl Unpin for Running
impl UnsafeUnpin for Runningwhere
*const ArcInner<Control> is !null: UnsafeUnpin,
PhantomData<ArcInner<Control>>: UnsafeUnpin,
*const ArcInner<Inner> is !null: UnsafeUnpin,
PhantomData<ArcInner<Inner>>: UnsafeUnpin,
*const ArcInner<Packet<'static, Result<Report, Error>>> is !null: UnsafeUnpin,
PhantomData<ArcInner<Packet<'static, Result<Report, Error>>>>: UnsafeUnpin,
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