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