code: func (pq *PriorityQueue) Put(items ...Item) error {
  	if len(items) == 0 {
  		return nil
  	}
  
  	pq.lock.Lock()
  	defer pq.lock.Unlock()
  
  	if pq.disposed {
  		return ErrDisposed
  	}
  
  	for _, item := range items {
  		if pq.allowDuplicates {
  			pq.items.push(item)
  		} else if _, ok := pq.itemMap[item]; !ok {
  			pq.itemMap[item] = struct{}{}
  			pq.items.push(item)
  		}
  	}
  
  	for {
  		sema := pq.waiters.get()
  		if sema == nil {
  			break
  		}
  
  		sema.response.Add(1)
  		sema.ready <- true
  		sema.response.Wait()
  		if len(pq.items) == 0 {
  			break
  		}
  	}
  
  	return nil
  }
docs: // Put adds items to the queue.