pub fn steal(&self) -> Steal<T> {
        // Load the front index.
        let f = self.inner.front.load(Ordering::Acquire);

        // A SeqCst fence is needed here.
        //
        // If the current thread is already pinned (reentrantly), we must manually issue the
        // fence. Otherwise, the following pinning will issue the fence anyway, so we don't
        // have to.
        if epoch::is_pinned() {
            atomic::fence(Ordering::SeqCst);
        }

        let guard = &epoch::pin();

        // Load the back index.
        let b = self.inner.back.load(Ordering::Acquire);

        // Is the queue empty?
        if b.wrapping_sub(f) <= 0 {
            return Steal::Empty;
        }

        // Load the buffer and read the task at the front.
        let buffer = self.inner.buffer.load(Ordering::Acquire, guard);
        let task = unsafe { buffer.deref().read(f) };

        // Try incrementing the front index to steal the task.
        if self
            .inner
            .front
            .compare_exchange(f, f.wrapping_add(1), Ordering::SeqCst, Ordering::Relaxed)
            .is_err()
        {
            // We didn't steal this task, forget it.
            mem::forget(task);
            return Steal::Retry;
        }

        // Return the stolen task.
        Steal::Success(task)
    }
/// Steals a task from the queue.
Steals a task from the queue.
Steals a task from the queue .
pub fn steal(&self) -> Steal<T> {
        // Load the front index.
        let f = self.inner.front.load(Ordering::Acquire);
        // A SeqCst fence is needed here.
        //
        // If the current thread is already pinned (reentrantly), we must manually issue the
        // fence. Otherwise, the following pinning will issue the fence anyway, so we don't
        // have to.
        if epoch::is_pinned() {
            atomic::fence(Ordering::SeqCst);
        }
        let guard = &epoch::pin();
        // Load the back index.
        let b = self.inner.back.load(Ordering::Acquire);
        // Is the queue empty?
        if b.wrapping_sub(f) <= 0 {
            return Steal::Empty;
        }
        // Load the buffer and read the task at the front.
        let buffer = self.inner.buffer.load(Ordering::Acquire, guard);
        let task = unsafe { buffer.deref().read(f) };
        // Try incrementing the front index to steal the task.
        if self
            .inner
            .front
            .compare_exchange(f, f.wrapping_add(1), Ordering::SeqCst, Ordering::Relaxed)
            .is_err()
        {
            // We didn't steal this task, forget it.
            mem::forget(task);
            return Steal::Retry;
        }
        // Return the stolen task.
        Steal::Success(task)
    }
pub fn steal ( & self ) -> Steal < T > { // Load the front index. let f = self . inner . front . load ( Ordering :: Acquire ) ; // A SeqCst fence is needed here. // // If the current thread is already pinned (reentrantly), we must manually issue the // fence. Otherwise, the following pinning will issue the fence anyway, so we don't // have to. if epoch :: is_pinned ( ) { atomic :: fence ( Ordering :: SeqCst ) ; } let guard = & epoch :: pin ( ) ; // Load the back index. let b = self . inner . back . load ( Ordering :: Acquire ) ; // Is the queue empty? if b . wrapping_sub ( f ) <= 0 { return Steal :: Empty ; } // Load the buffer and read the task at the front. let buffer = self . inner . buffer . load ( Ordering :: Acquire , guard ) ; let task = unsafe { buffer . deref ( ) . read ( f ) } ; // Try incrementing the front index to steal the task. if self . inner . front . compare_exchange ( f , f . wrapping_add ( 1 ) , Ordering :: SeqCst , Ordering :: Relaxed ) . is_err ( ) { // We didn't steal this task, forget it. mem :: forget ( task ) ; return Steal :: Retry ; } // Return the stolen task. Steal :: Success ( task ) }
Steals a task from the queue.
Steals a task from the queue .
&self
&self