mirror of
https://github.com/tmrts/go-patterns.git
synced 2025-04-02 20:56:12 +03:00
[fanout] Codereview
This commit is contained in:
parent
c033afdbea
commit
1d5fba6f6f
1 changed files with 2 additions and 2 deletions
|
@ -30,8 +30,8 @@ func (p *Pipeline) Start() {
|
|||
if expectationWorkers > MaxWorkers {
|
||||
expectationWorkers = expectationWorkers % MaxWorkers
|
||||
}
|
||||
for _, c := range pipe.workers {
|
||||
if expectationWorkers < int(c.index) {
|
||||
for index, c := range pipe.workers {
|
||||
if expectationWorkers < index {
|
||||
break
|
||||
}
|
||||
select {
|
||||
|
|
Loading…
Add table
Reference in a new issue