Queue a task queue for mitigating server pressure in high concurrency situations and improving task processing
| 19 | // Queue a task queue for mitigating server pressure in high concurrency situations |
| 20 | // and improving task processing |
| 21 | type 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 |
| 31 | func (q *Queue) Run() { |
nothing calls this directly
no outgoing calls
no test coverage detected