Skip to content

Commit

Permalink
Switched dispatch check to cap from len
Browse files Browse the repository at this point in the history
  • Loading branch information
markdicksonjr committed May 26, 2019
1 parent d00ca5a commit dbebe79
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion dispatcher.go
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ func (d *Dispatcher) dispatch() {
for {

// if there are no workers ready to receive the job, let the job queue fill up
if int(d.RunCount()) == len(d.workerPool) {
if int(d.RunCount()) == cap(d.workerPool) {
continue
}

Expand Down

0 comments on commit dbebe79

Please sign in to comment.