code: func (pq *PriorityQueue) Get(number int) ([]Item, error) {
  	if number < 1 {
  		return nil, nil
  	}
  
  	pq.lock.Lock()
  
  	if pq.disposed {
  		pq.lock.Unlock()
  		return nil, ErrDisposed
  	}
  
  	var items []Item
  
  	// Remove references to popped items.
  	deleteItems := func(items []Item) {
  		for _, item := range items {
  			delete(pq.itemMap, item)
  		}
  	}
  
  	if len(pq.items) == 0 {
  		sema := newSema()
  		pq.waiters.put(sema)
  		pq.lock.Unlock()
  
  		<-sema.ready
  
  		if pq.Disposed() {
  			return nil, ErrDisposed
  		}
  
  		items = pq.items.get(number)
  		if !pq.allowDuplicates {
  			deleteItems(items)
  		}
  		sema.response.Done()
  		return items, nil
  	}
  
  	items = pq.items.get(number)
  	deleteItems(items)
  	pq.lock.Unlock()
  	return items, nil
  }
docs: // Get retrieves items from the queue.  If the queue is empty,
  // this call blocks until the next item is added to the queue.  This
  // will attempt to retrieve number of items.