func (q *UniqueQueue) Add(value TimedValue) bool {
	q.lock.Lock()
	defer q.lock.Unlock()

	if q.set.Has(value.Value) {
		return false
	}
	heap.Push(&q.queue, &value)
	q.set.Insert(value.Value)
	return true
}
// Add a new value to the queue if it wasn't added before, or was
// explicitly removed by the Remove call. Returns true if new value
// was added.
Add a new value to the queue if it wasn't added before, or was
explicitly removed by the Remove call. Returns true if new value
was added.
// Add a new value to the queue if it wasn ' t added before or was // explicitly removed by the Remove call . Returns true if new value // was added .
func (q *UniqueQueue) Add(value TimedValue) bool {
	q.lock.Lock()
	defer q.lock.Unlock()
	if q.set.Has(value.Value) {
		return false
	}
	heap.Push(&q.queue, &value)
	q.set.Insert(value.Value)
	return true
}
func ( q * UniqueQueue ) Add ( value TimedValue ) bool { q . lock . Lock ( ) defer q . lock . Unlock ( ) if q . set . Has ( value . Value ) { return false } heap . Push ( & q . queue , & value ) q . set . Insert ( value . Value ) return true }
Add a new value to the queue if it wasn't added before, or was
explicitly removed by the Remove call.
Add a new value to the queue if it wasn ' t added before or was explicitly removed by the Remove call .