ListQueue a list task queue for mitigating server pressure in high concurrency situations and improving task processing
| 29 | // ListQueue a list task queue for mitigating server pressure in high concurrency situations |
| 30 | // and improving task processing |
| 31 | type ListQueue struct { |
| 32 | maxLen int |
| 33 | maxWorker int |
| 34 | workers []*worker |
| 35 | workerPool chan chan Jober |
| 36 | list *list.List |
| 37 | lock *sync.RWMutex |
| 38 | wg *sync.WaitGroup |
| 39 | running uint32 |
| 40 | } |
| 41 | |
| 42 | // Run start running queues |
| 43 | func (q *ListQueue) Run() { |
nothing calls this directly
no outgoing calls
no test coverage detected