pub struct Runner<T> {
pub thread: Option<JoinHandle<()>>,
/* private fields */
}
Expand description
the basic runner
the runner can only Runner::start
once.
drop the runner or return true
in task to stop it.
you can take the thread join handle to wait until it stopped.
Fields§
§thread: Option<JoinHandle<()>>
Implementations§
Trait Implementations§
impl<T> Send for Runner<T>
impl<T> Sync for Runner<T>
Auto Trait Implementations§
impl<T> Freeze for Runner<T>
impl<T> !RefUnwindSafe for Runner<T>
impl<T> Unpin for Runner<T>
impl<T> !UnwindSafe for Runner<T>
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