Codebase list golang-github-vbauerster-mpb / ac11bbc
forceRefresh without wg Vladimir Bauer 3 years ago
1 changed file(s) with 0 addition(s) and 2 deletion(s). Raw diff Collapse all Expand all
448448 }
449449
450450 func (b *Bar) forceRefresh(refreshCh chan<- time.Time) {
451 b.container.bwg.Add(1)
452451 go b.forceRefreshImpl(refreshCh)
453452 }
454453
455454 func (b *Bar) forceRefreshImpl(refreshCh chan<- time.Time) {
456 defer b.container.bwg.Done()
457455 var anyOtherRunning bool
458456 b.container.traverseBars(func(bar *Bar) bool {
459457 anyOtherRunning = b != bar && bar.IsRunning()