[][src]Struct managed_thread::Signal

pub struct Signal { /* fields omitted */ }

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

impl Debug for Signal[src]

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]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.