MCPcopy
hub / github.com/grafana/dskit / submit

Method submit

cache/async_queue.go:33–40  ·  view source on GitHub ↗

submit adds an operation to the queue or returns an error if the queue is full

(op func())

Source from the content-addressed store, hash-verified

31
32// submit adds an operation to the queue or returns an error if the queue is full
33func (q *asyncQueue) submit(op func()) error {
34 select {
35 case q.queueCh <- op:
36 return nil
37 default:
38 return errAsyncQueueFull
39 }
40}
41
42func (q *asyncQueue) stop() {
43 close(q.stopCh)

Callers 4

SetAsyncMethod · 0.80
waitMethod · 0.80
TestAsyncQueue_RunFunction · 0.80

Calls

no outgoing calls

Tested by 2

TestAsyncQueue_RunFunction · 0.64