func newDelayingQueue(clock clock.Clock) DelayingInterface { ret := &delayingType{ Interface: New(), clock: clock, heartbeat: clock.Tick(maxWait), stopCh: make(chan struct{}), waitingTimeByEntry: map[t]time.Time{}, waitingForAddCh: make(chan waitFor, 1000), } go ret.waitingLoop() return ret }