Codebase list golang-github-vbauerster-mpb / 71e7d35
minor: one line func Vladimir Bauer 3 years ago
1 changed file(s) with 2 addition(s) and 6 deletion(s). Raw diff Collapse all Expand all
143143 // operation for example.
144144 func (b *Bar) SetRefill(amount int64) {
145145 select {
146 case b.operateState <- func(s *bState) {
147 s.refill = amount
148 }:
146 case b.operateState <- func(s *bState) { s.refill = amount }:
149147 case <-b.done:
150148 }
151149 }
324322 // or after progress resume.
325323 func (b *Bar) DecoratorAverageAdjust(start time.Time) {
326324 select {
327 case b.operateState <- func(s *bState) {
328 s.decoratorAverageAdjust(start)
329 }:
325 case b.operateState <- func(s *bState) { s.decoratorAverageAdjust(start) }:
330326 case <-b.done:
331327 }
332328 }