fn change_state(&mut self, state: ThreadState, base: &KObjectBase) {
        self.state = state;
        match self.state() {
            ThreadState::Dead => base.signal_change(
                Signal::THREAD_RUNNING | Signal::THREAD_SUSPENDED,
                Signal::THREAD_TERMINATED,
            ),
            ThreadState::New | ThreadState::Dying => base.signal_clear(
                Signal::THREAD_RUNNING | Signal::THREAD_SUSPENDED | Signal::THREAD_TERMINATED,
            ),
            ThreadState::Suspended => base.signal_change(
                Signal::THREAD_RUNNING | Signal::THREAD_TERMINATED,
                Signal::THREAD_SUSPENDED,
            ),
            _ => base.signal_change(
                Signal::THREAD_TERMINATED | Signal::THREAD_SUSPENDED,
                Signal::THREAD_RUNNING,
            ),
        }
    }
/// Change state and update signal.
Change state and update signal.
Change state and update signal .
fn change_state(&mut self, state: ThreadState, base: &KObjectBase) {
        self.state = state;
        match self.state() {
            ThreadState::Dead => base.signal_change(
                Signal::THREAD_RUNNING | Signal::THREAD_SUSPENDED,
                Signal::THREAD_TERMINATED,
            ),
            ThreadState::New | ThreadState::Dying => base.signal_clear(
                Signal::THREAD_RUNNING | Signal::THREAD_SUSPENDED | Signal::THREAD_TERMINATED,
            ),
            ThreadState::Suspended => base.signal_change(
                Signal::THREAD_RUNNING | Signal::THREAD_TERMINATED,
                Signal::THREAD_SUSPENDED,
            ),
            _ => base.signal_change(
                Signal::THREAD_TERMINATED | Signal::THREAD_SUSPENDED,
                Signal::THREAD_RUNNING,
            ),
        }
    }
fn change_state ( & mut self , state : ThreadState , base : & KObjectBase ) { self . state = state ; match self . state ( ) { ThreadState :: Dead => base . signal_change ( Signal :: THREAD_RUNNING | Signal :: THREAD_SUSPENDED , Signal :: THREAD_TERMINATED , ) , ThreadState :: New | ThreadState :: Dying => base . signal_clear ( Signal :: THREAD_RUNNING | Signal :: THREAD_SUSPENDED | Signal :: THREAD_TERMINATED , ) , ThreadState :: Suspended => base . signal_change ( Signal :: THREAD_RUNNING | Signal :: THREAD_TERMINATED , Signal :: THREAD_SUSPENDED , ) , _ => base . signal_change ( Signal :: THREAD_TERMINATED | Signal :: THREAD_SUSPENDED , Signal :: THREAD_RUNNING , ) , } }
Change state and update signal.
Change state and update signal .
&mut self
state
ThreadState
base
&KObjectBase
&mut self
state
ThreadState
base
&KObjectBase