pub fn pop_front_many(&self, buffer: &mut [T]) -> usize {
        if unlikely(buffer.is_empty()) {
            return 0;
        }

        loop {
            let mut guard = self.queue.lock();
            if let Some(t) = guard.pop_front() {
                buffer[0] = t;

                let mut count = 1usize;
                while count < buffer.len() {
                    if let Some(t) = guard.pop_front() {
                        buffer[count] = t;
                        count += 1;
                    } else {
                        break;
                    }
                }

                return count;
            } else {
                self.cond_var.wait(guard);
            }
        }
    }
/// If there are no elements available: block.
/// Otherwise: pops as many elements as possible without going to block.
If there are no elements available: block.
Otherwise: pops as many elements as possible without going to block.
If there are no elements available : block . Otherwise : pops as many elements as possible without going to block .
pub fn pop_front_many(&self, buffer: &mut [T]) -> usize {
        if unlikely(buffer.is_empty()) {
            return 0;
        }
        loop {
            let mut guard = self.queue.lock();
            if let Some(t) = guard.pop_front() {
                buffer[0] = t;
                let mut count = 1usize;
                while count < buffer.len() {
                    if let Some(t) = guard.pop_front() {
                        buffer[count] = t;
                        count += 1;
                    } else {
                        break;
                    }
                }
                return count;
            } else {
                self.cond_var.wait(guard);
            }
        }
    }
pub fn pop_front_many ( & self , buffer : & mut [ T ] ) -> usize { if unlikely ( buffer . is_empty ( ) ) { return 0 ; } loop { let mut guard = self . queue . lock ( ) ; if let Some ( t ) = guard . pop_front ( ) { buffer [ 0 ] = t ; let mut count = 1usize ; while count < buffer . len ( ) { if let Some ( t ) = guard . pop_front ( ) { buffer [ count ] = t ; count += 1 ; } else { break ; } } return count ; } else { self . cond_var . wait ( guard ) ; } } }
If there are no elements available: block.
If there are no elements available : block .
&self
buffer
&mut [T]
&self
buffer
&mut [T]