pub fn len(&self) -> usize {
        loop {
            // Load the tail index, then load the head index.
            let tail_index = self.tail.index.load(Ordering::SeqCst);
            let head_index = self.head.index.load(Ordering::SeqCst);

            // If the tail index didn't change, we've got consistent indices to work with.
            if self.tail.index.load(Ordering::SeqCst) == tail_index {
                return tail_index.wrapping_sub(head_index);
            }
        }
    }
/// Returns the current number of messages inside the channel.
Returns the current number of messages inside the channel.
Returns the current number of messages inside the channel .
pub fn len(&self) -> usize {
        loop {
            // Load the tail index, then load the head index.
            let tail_index = self.tail.index.load(Ordering::SeqCst);
            let head_index = self.head.index.load(Ordering::SeqCst);
            // If the tail index didn't change, we've got consistent indices to work with.
            if self.tail.index.load(Ordering::SeqCst) == tail_index {
                return tail_index.wrapping_sub(head_index);
            }
        }
    }
pub fn len ( & self ) -> usize { loop { // Load the tail index, then load the head index. let tail_index = self . tail . index . load ( Ordering :: SeqCst ) ; let head_index = self . head . index . load ( Ordering :: SeqCst ) ; // If the tail index didn't change, we've got consistent indices to work with. if self . tail . index . load ( Ordering :: SeqCst ) == tail_index { return tail_index . wrapping_sub ( head_index ) ; } } }
Returns the current number of messages inside the channel.
Returns the current number of messages inside the channel .
&self