MCPcopy
hub / github.com/prometheus/prometheus / newWriteJobQueue

Function newWriteJobQueue

tsdb/chunks/queue.go:39–52  ·  view source on GitHub ↗
(maxSize, segmentSize int)

Source from the content-addressed store, hash-verified

37}
38
39func newWriteJobQueue(maxSize, segmentSize int) *writeJobQueue {
40 if maxSize <= 0 || segmentSize <= 0 {
41 panic("invalid queue")
42 }
43
44 q := &writeJobQueue{
45 maxSize: maxSize,
46 segmentSize: segmentSize,
47 }
48
49 q.pushed = sync.NewCond(&q.mtx)
50 q.popped = sync.NewCond(&q.mtx)
51 return q
52}
53
54func (q *writeJobQueue) close() {
55 q.mtx.Lock()

Calls

no outgoing calls

Used in the wild real call sites across dependent graphs

searching dependent graphs…