Codebase list golang-github-vbauerster-mpb / 374cd82
minor: why tryEarlyRefresh call comment Vladimir Bauer 3 years ago
1 changed file(s) with 3 addition(s) and 0 deletion(s). Raw diff Collapse all Expand all
450450
451451 func (b *Bar) triggerCompletion(autoRefresh bool, refreshCh chan<- time.Time) {
452452 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.
453456 go b.tryEarlyRefresh(refreshCh)
454457 } else {
455458 b.cancel()