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

	if !q.set.Has(value) {
		return false
	}
	for i, val := range q.queue {
		if val.Value == value {
			heap.Remove(&q.queue, i)
			return true
		}
	}
	return false
}
// RemoveFromQueue the value from the queue, but keeps it in the set,
// so it won't be added second time. Returns true if something was
// removed.
RemoveFromQueue the value from the queue, but keeps it in the set,
so it won't be added second time. Returns true if something was
removed.
// RemoveFromQueue the value from the queue but keeps it in the set // so it won ' t be added second time . Returns true if something was // removed .
func (q *UniqueQueue) RemoveFromQueue(value string) bool {
	q.lock.Lock()
	defer q.lock.Unlock()
	if !q.set.Has(value) {
		return false
	}
	for i, val := range q.queue {
		if val.Value == value {
			heap.Remove(&q.queue, i)
			return true
		}
	}
	return false
}
func ( q * UniqueQueue ) RemoveFromQueue ( value string ) bool { q . lock . Lock ( ) defer q . lock . Unlock ( ) if ! q . set . Has ( value ) { return false } for i , val := range q . queue { if val . Value == value { heap . Remove ( & q . queue , i ) return true } } return false }
RemoveFromQueue the value from the queue, but keeps it in the set,
so it won't be added second time.
RemoveFromQueue the value from the queue but keeps it in the set so it won ' t be added second time .