fn maybe_shrink(&mut self) {
        // Pop item which is none to make queue not too long.
        while let Some(item) = self.waiting.front() {
            if item.is_some() {
                break;
            }
            self.waiting.pop_front().unwrap();
        }
        if self.waiting.capacity() > WAITING_LIST_MAX_CAPACITY
            && self.waiting.len() < WAITING_LIST_SHRINK_SIZE
        {
            self.waiting.shrink_to_fit();
        }
    }
/// For some hot keys, the waiting list maybe very long, so we should shrink the waiting
/// VecDeque after pop.
For some hot keys, the waiting list maybe very long, so we should shrink the waiting
VecDeque after pop.
For some hot keys the waiting list maybe very long so we should shrink the waiting VecDeque after pop .
fn maybe_shrink(&mut self) {
        // Pop item which is none to make queue not too long.
        while let Some(item) = self.waiting.front() {
            if item.is_some() {
                break;
            }
            self.waiting.pop_front().unwrap();
        }
        if self.waiting.capacity() > WAITING_LIST_MAX_CAPACITY
            && self.waiting.len() < WAITING_LIST_SHRINK_SIZE
        {
            self.waiting.shrink_to_fit();
        }
    }
fn maybe_shrink ( & mut self ) { // Pop item which is none to make queue not too long. while let Some ( item ) = self . waiting . front ( ) { if item . is_some ( ) { break ; } self . waiting . pop_front ( ) . unwrap ( ) ; } if self . waiting . capacity ( ) > WAITING_LIST_MAX_CAPACITY && self . waiting . len ( ) < WAITING_LIST_SHRINK_SIZE { self . waiting . shrink_to_fit ( ) ; } }
For some hot keys, the waiting list maybe very long, so we should shrink the waiting
VecDeque after pop.
For some hot keys the waiting list maybe very long so we should shrink the waiting VecDeque after pop .
&mut self