Codebase list golang-github-vbauerster-mpb / 96571d1
refactoring forceRefreshImpl => tryEarlyRefresh Vladimir Bauer 3 years ago
1 changed file(s) with 2 addition(s) and 2 deletion(s). Raw diff Collapse all Expand all
450450
451451 func (b *Bar) triggerCompletion(autoRefresh bool, refreshCh chan<- time.Time) {
452452 if autoRefresh {
453 go b.forceRefreshImpl(refreshCh)
453 go b.tryEarlyRefresh(refreshCh)
454454 } else {
455455 b.cancel()
456456 }
457457 }
458458
459 func (b *Bar) forceRefreshImpl(refreshCh chan<- time.Time) {
459 func (b *Bar) tryEarlyRefresh(refreshCh chan<- time.Time) {
460460 var anyOtherRunning bool
461461 b.container.traverseBars(func(bar *Bar) bool {
462462 anyOtherRunning = b != bar && bar.IsRunning()