MCPcopy Create free account
hub / github.com/LyricTian/queue / Run

Method Run

list_queue.go:43–55  ·  view source on GitHub ↗

Run start running queues

()

Source from the content-addressed store, hash-verified

41
42// Run start running queues
43func (q *ListQueue) Run() {
44 if atomic.LoadUint32(&q.running) == 1 {
45 return
46 }
47 atomic.StoreUint32(&q.running, 1)
48
49 for i := 0; i < q.maxWorker; i++ {
50 q.workers[i] = newWorker(q.workerPool, q.wg)
51 q.workers[i].Start()
52 }
53
54 go q.dispatcher()
55}
56
57func (q *ListQueue) dispatcher() {
58 for {

Callers 3

TestListQueueFunction · 0.95
ExampleListQueueFunction · 0.95
BenchmarkListQueueFunction · 0.95

Calls 3

dispatcherMethod · 0.95
newWorkerFunction · 0.85
StartMethod · 0.80

Tested by 3

TestListQueueFunction · 0.76
ExampleListQueueFunction · 0.76
BenchmarkListQueueFunction · 0.76