func (q *UniqueQueue) Remove(value string) bool {
	q.lock.Lock()
	defer q.lock.Unlock()

	if !q.set.Has(value) {
		return false
	}
	q.set.Delete(value)
	for i, val := range q.queue {
		if val.Value == value {
			heap.Remove(&q.queue, i)
			return true
		}
	}
	return true
}
// Remove the value from the queue, so Get() call won't return it, and
// allow subsequent addition of the given value. If the value is not
// present does nothing and returns false.
Remove the value from the queue, so Get() call won't return it, and
allow subsequent addition of the given value. If the value is not
present does nothing and returns false.
// Remove the value from the queue so Get () call won ' t return it and // allow subsequent addition of the given value . If the value is not // present does nothing and returns false .
func (q *UniqueQueue) Remove(value string) bool {
	q.lock.Lock()
	defer q.lock.Unlock()
	if !q.set.Has(value) {
		return false
	}
	q.set.Delete(value)
	for i, val := range q.queue {
		if val.Value == value {
			heap.Remove(&q.queue, i)
			return true
		}
	}
	return true
}
func ( q * UniqueQueue ) Remove ( value string ) bool { q . lock . Lock ( ) defer q . lock . Unlock ( ) if ! q . set . Has ( value ) { return false } q . set . Delete ( value ) for i , val := range q . queue { if val . Value == value { heap . Remove ( & q . queue , i ) return true } } return true }
Remove the value from the queue, so Get() call won't return it, and
allow subsequent addition of the given value.
Remove the value from the queue so Get () call won ' t return it and allow subsequent addition of the given value .