pub fn tick(&self) -> bool {
        loop {
            match self.search() {
                None => {
                    // Move to sleeping and unnotified state.
                    if !self.sleep() {
                        // If already sleeping and unnotified, return.
                        return false;
                    }
                }
                Some(r) => {
                    // Wake up.
                    self.wake();

                    // Notify another worker now to pick up where this worker left off, just in
                    // case running the task takes a long time.
                    self.global.notify();

                    // Bump the ticker.
                    let ticker = self.ticker.get();
                    self.ticker.set(ticker.wrapping_add(1));

                    // Steal tasks from the global queue to ensure fair task scheduling.
                    if ticker % 64 == 0 {
                        steal(&self.global.queue, &self.shard);
                    }

                    // Run the task.
                    WORKER.set(self, || r.run());

                    return true;
                }
            }
        }
    }
/// Runs a single task and returns `true` if one was found.
Runs a single task and returns `true` if one was found.
Runs a single task and returns ` true ` if one was found .
pub fn tick(&self) -> bool {
        loop {
            match self.search() {
                None => {
                    // Move to sleeping and unnotified state.
                    if !self.sleep() {
                        // If already sleeping and unnotified, return.
                        return false;
                    }
                }
                Some(r) => {
                    // Wake up.
                    self.wake();
                    // Notify another worker now to pick up where this worker left off, just in
                    // case running the task takes a long time.
                    self.global.notify();
                    // Bump the ticker.
                    let ticker = self.ticker.get();
                    self.ticker.set(ticker.wrapping_add(1));
                    // Steal tasks from the global queue to ensure fair task scheduling.
                    if ticker % 64 == 0 {
                        steal(&self.global.queue, &self.shard);
                    }
                    // Run the task.
                    WORKER.set(self, || r.run());
                    return true;
                }
            }
        }
    }
pub fn tick ( & self ) -> bool { loop { match self . search ( ) { None => { // Move to sleeping and unnotified state. if ! self . sleep ( ) { // If already sleeping and unnotified, return. return false ; } } Some ( r ) => { // Wake up. self . wake ( ) ; // Notify another worker now to pick up where this worker left off, just in // case running the task takes a long time. self . global . notify ( ) ; // Bump the ticker. let ticker = self . ticker . get ( ) ; self . ticker . set ( ticker . wrapping_add ( 1 ) ) ; // Steal tasks from the global queue to ensure fair task scheduling. if ticker % 64 == 0 { steal ( & self . global . queue , & self . shard ) ; } // Run the task. WORKER . set ( self , | | r . run ( ) ) ; return true ; } } } }
Runs a single task and returns `true` if one was found.
Runs a single task and returns ` true ` if one was found .
&self