mirror of
https://github.com/crazybber/awesome-patterns.git
synced 2024-11-22 12:46:03 +03:00
[fanout] Codereview
This commit is contained in:
parent
c033afdbea
commit
1d5fba6f6f
@ -30,8 +30,8 @@ func (p *Pipeline) Start() {
|
|||||||
if expectationWorkers > MaxWorkers {
|
if expectationWorkers > MaxWorkers {
|
||||||
expectationWorkers = expectationWorkers % MaxWorkers
|
expectationWorkers = expectationWorkers % MaxWorkers
|
||||||
}
|
}
|
||||||
for _, c := range pipe.workers {
|
for index, c := range pipe.workers {
|
||||||
if expectationWorkers < int(c.index) {
|
if expectationWorkers < index {
|
||||||
break
|
break
|
||||||
}
|
}
|
||||||
select {
|
select {
|
||||||
|
Loading…
Reference in New Issue
Block a user