MCPcopy
hub / github.com/kubernetes/client-go / newQueue

Function newQueue

util/workqueue/queue.go:49–60  ·  view source on GitHub ↗
(c clock.Clock, metrics queueMetrics, updatePeriod time.Duration)

Source from the content-addressed store, hash-verified

47}
48
49func newQueue(c clock.Clock, metrics queueMetrics, updatePeriod time.Duration) *Type {
50 t := &Type{
51 clock: c,
52 dirty: set{},
53 processing: set{},
54 cond: sync.NewCond(&sync.Mutex{}),
55 metrics: metrics,
56 unfinishedWorkUpdatePeriod: updatePeriod,
57 }
58 go t.updateUnfinishedWorkLoop()
59 return t
60}
61
62const defaultUnfinishedWorkUpdatePeriod = 500 * time.Millisecond
63

Callers 3

TestMetricShutdownFunction · 0.85
TestMetricsFunction · 0.85
NewNamedFunction · 0.85

Calls 1

Tested by 2

TestMetricShutdownFunction · 0.68
TestMetricsFunction · 0.68