minor: why tryEarlyRefresh call comment
Vladimir Bauer
3 years ago
| 450 | 450 | |
| 451 | 451 | func (b *Bar) triggerCompletion(autoRefresh bool, refreshCh chan<- time.Time) { |
| 452 | 452 | if autoRefresh { |
| 453 | // Technically this call isn't required, but if refresh rate is set to | |
| 454 | // one hour for example and bar completes within a few minutes p.Wait() | |
| 455 | // will wait for one hour. This call helps to avoid unnecessary waiting. | |
| 453 | 456 | go b.tryEarlyRefresh(refreshCh) |
| 454 | 457 | } else { |
| 455 | 458 | b.cancel() |