code: func (p *PriorityQueue) Pop() (*v1.Pod, error) {
  	p.lock.Lock()
  	defer p.lock.Unlock()
  	for p.activeQ.Len() == 0 {
  		// When the queue is empty, invocation of Pop() is blocked until new item is enqueued.
  		// When Close() is called, the p.closed is set and the condition is broadcast,
  		// which causes this loop to continue and return from the Pop().
  		if p.closed {
  			return nil, fmt.Errorf(queueClosed)
  		}
  		p.cond.Wait()
  	}
  	obj, err := p.activeQ.Pop()
  	if err != nil {
  		return nil, err
  	}
  	pInfo := obj.(*podInfo)
  	p.schedulingCycle++
  	return pInfo.pod, err
  }
docs: // Pop removes the head of the active queue and returns it. It blocks if the
  // activeQ is empty and waits until a new item is added to the queue. It
  // increments scheduling cycle when a pod is popped.