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

Struct Queue

chan_queue.go:21–28  ·  view source on GitHub ↗

Queue a task queue for mitigating server pressure in high concurrency situations and improving task processing

Source from the content-addressed store, hash-verified

19// Queue a task queue for mitigating server pressure in high concurrency situations
20// and improving task processing
21type Queue struct {
22 maxWorkers int
23 jobQueue chan Jober
24 workerPool chan chan Jober
25 workers []*worker
26 running uint32
27 wg *sync.WaitGroup
28}
29
30// Run start running queues
31func (q *Queue) Run() {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected