// Remove removes an item with the specified id from the TTL if it exists and
// returns it with the truth if it was found.
Remove removes an item with the specified id from the TTL if it exists and
returns it with the truth if it was found.
// Remove removes an item with the specified id from the TTL if it exists and // returns it with the truth if it was found .
func (ttl *TTL) Remove(id ItemID) (item *Item, exists bool) {
	ttl.mu.Lock()
	item, exists = ttl.remove(id)
	if !exists {
		ttl.mu.Unlock()
		return
	}
	if !ttl.running {
		go func() {
			go ttl.timerFunc()
			ttl.resetchan <- struct{}{}
		}()
	}
	ttl.mu.Unlock()
	return
}
func ( ttl * TTL ) Remove ( id ItemID ) ( item * Item , exists bool ) { ttl . mu . Lock ( ) item , exists = ttl . remove ( id ) if ! exists { ttl . mu . Unlock ( ) return } if ! ttl . running { go func ( ) { go ttl . timerFunc ( ) ttl . resetchan <- struct { } { } } ( ) } ttl . mu . Unlock ( ) return }
Remove removes an item with the specified id from the TTL if it exists and
returns it with the truth if it was found.
Remove removes an item with the specified id from the TTL if it exists and returns it with the truth if it was found .