pub fn signal_work(&self, pool: &Arc<Pool>) {
        debug_assert_eq!(*self, **pool);

        use worker::Lifecycle::Signaled;

        if let Some((idx, worker_state)) = self.sleep_stack.pop(&self.workers, Signaled, false) {
            let entry = &self.workers[idx];

            debug_assert!(
                worker_state.lifecycle() != Signaled,
                "actual={:?}",
                worker_state.lifecycle(),
            );

            trace!("signal_work -- notify; idx={}", idx);

            if !entry.notify(worker_state) {
                trace!("signal_work -- spawn; idx={}", idx);
                self.spawn_thread(WorkerId(idx), pool);
            }
        }
    }
/// If there are any other workers currently relaxing, signal them that work
/// is available so that they can try to find more work to process.
If there are any other workers currently relaxing, signal them that work
is available so that they can try to find more work to process.
If there are any other workers currently relaxing signal them that work is available so that they can try to find more work to process .
pub fn signal_work(&self, pool: &Arc<Pool>) {
        debug_assert_eq!(*self, **pool);
        use worker::Lifecycle::Signaled;
        if let Some((idx, worker_state)) = self.sleep_stack.pop(&self.workers, Signaled, false) {
            let entry = &self.workers[idx];
            debug_assert!(
                worker_state.lifecycle() != Signaled,
                "actual={:?}",
                worker_state.lifecycle(),
            );
            trace!("signal_work -- notify; idx={}", idx);
            if !entry.notify(worker_state) {
                trace!("signal_work -- spawn; idx={}", idx);
                self.spawn_thread(WorkerId(idx), pool);
            }
        }
    }
pub fn signal_work ( & self , pool : & Arc < Pool > ) { debug_assert_eq ! ( self pool ) ; use worker :: Lifecycle :: Signaled ; if let Some ( ( idx , worker_state ) ) = self . sleep_stack . pop ( & self . workers , Signaled , false ) { let entry = & self . workers [ idx ] ; debug_assert ! ( worker_state lifecycle ( ) Signaled " " worker_state lifecycle ( ) ) ; trace ! ( " " idx ) ; if ! entry . notify ( worker_state ) { trace ! ( " " idx ) ; self . spawn_thread ( WorkerId ( idx ) , pool ) ; } } }
If there are any other workers currently relaxing, signal them that work
is available so that they can try to find more work to process.
If there are any other workers currently relaxing signal them that work is available so that they can try to find more work to process .
&self
pool
&Arc<Pool>