do nothing on incr <= 0
Vladimir Bauer
9 years ago
1 changed file(s) with
3 addition(s)
and
0 deletion(s)
.
Raw diff
Collapse all
Expand all
+3
-0
bar.go
less
more
209
209
for {
210
210
select {
211
211
case i := <-b.incrCh:
212
if i <= 0 {
213
break
214
}
212
215
n := state.current + i
213
216
if n > total {
214
217
state.current = total