// Remove removes a Value from the queue and returns true if queue is not empty,
// false otherwise.
Remove removes a Value from the queue and returns true if queue is not empty,
false otherwise.
// Remove removes a Value from the queue and returns true if queue is not empty // false otherwise .
func (fifo *FIFO) Remove(value interface{}) bool {
	fifo.mu.Lock()
	defer fifo.mu.Unlock()
	var last *Item
	curr := fifo.first
	for curr != nil {
		if fifo.cf(curr.Value, value) {
			if last != nil {
				last.next = curr.next
			} else {
				fifo.first = curr.next
			}
			if curr.next == nil {
				fifo.last = nil
			}
			fifo.length--
			return true
		}
		last = curr
		curr = curr.next
	}
	return false
}
func ( fifo * FIFO ) Remove ( value interface { } ) bool { fifo . mu . Lock ( ) defer fifo . mu . Unlock ( ) var last * Item curr := fifo . first for curr != nil { if fifo . cf ( curr . Value , value ) { if last != nil { last . next = curr . next } else { fifo . first = curr . next } if curr . next == nil { fifo . last = nil } fifo . length -- return true } last = curr curr = curr . next } return false }
Remove removes a Value from the queue and returns true if queue is not empty,
false otherwise.
Remove removes a Value from the queue and returns true if queue is not empty false otherwise .