[−][src]Struct managed_thread::Signal
The signal type that is passed to the thread.
The thread must check the signal periodically for whether it should terminate or not. If the signal notifies the thread to stop, it should exit as fast as possible.
Implementations
impl Signal
[src]
pub fn should_continue(&self) -> bool
[src]
Check whether the thread this signal was passed to is allowed to continue
Opposite of should_stop
pub fn should_stop(&self) -> bool
[src]
Check whether the thread this signal was passed to should stop now. If this function returns true, the thread should exit as soon as possible.
Warning: Once this function returned true
, due to current limitations, it might not return
true
when called again. Once true
is returned, exit without checking the signal again.
Trait Implementations
Auto Trait Implementations
impl !RefUnwindSafe for Signal
impl Send for Signal
impl !Sync for Signal
impl Unpin for Signal
impl !UnwindSafe for Signal
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,