MCPcopy
hub / github.com/grafana/tempo / Enqueue

Method Enqueue

pkg/flushqueues/exclusivequeues.go:24–31  ·  view source on GitHub ↗

Enqueue adds the op to the queue and prevents any other items to be added with this key

(op T)

Source from the content-addressed store, hash-verified

22
23// Enqueue adds the op to the queue and prevents any other items to be added with this key
24func (f *ExclusiveQueues[T]) Enqueue(op T) error {
25 _, loaded := f.activeKeys.LoadOrStore(op.Key(), struct{}{})
26 if loaded {
27 return nil
28 }
29
30 return f.Requeue(op)
31}
32
33// Dequeue removes the next op from the queue. After dequeueing the calling
34// process either needs to call Clear or Requeue.

Callers 1

RequeueMethod · 0.45

Calls 2

RequeueMethod · 0.95
KeyMethod · 0.65

Tested by

no test coverage detected