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

Method Push

chan_queue.go:69–76  ·  view source on GitHub ↗

Push put the executable task into the queue

(job Jober)

Source from the content-addressed store, hash-verified

67
68// Push put the executable task into the queue
69func (q *Queue) Push(job Jober) {
70 if atomic.LoadUint32(&q.running) != 1 {
71 return
72 }
73
74 q.wg.Add(1)
75 q.jobQueue <- job
76}
77
78func (q *Queue) GetJobCount() int {
79 return len(q.jobQueue)

Callers 4

TestQueueFunction · 0.95
TestSyncQueueFunction · 0.95
ExampleQueueFunction · 0.95
BenchmarkQueueFunction · 0.95

Calls

no outgoing calls

Tested by 4

TestQueueFunction · 0.76
TestSyncQueueFunction · 0.76
ExampleQueueFunction · 0.76
BenchmarkQueueFunction · 0.76