GoQueue implements Queue using a pool of worker goroutines.
| 99 | |
| 100 | // GoQueue implements Queue using a pool of worker goroutines. |
| 101 | type GoQueue struct { |
| 102 | requests chan Request |
| 103 | completions chan Completion |
| 104 | shutdown chan struct{} |
| 105 | workers sync.WaitGroup |
| 106 | numWorkers int |
| 107 | } |
| 108 | |
| 109 | // NewGoQueue returns a new GoQueue with the given capacity. |
| 110 | func NewGoQueue(cap int) *GoQueue { |
nothing calls this directly
no outgoing calls
no test coverage detected