forceRefresh without wg
Vladimir Bauer
3 years ago
| 448 | 448 | } |
| 449 | 449 | |
| 450 | 450 | func (b *Bar) forceRefresh(refreshCh chan<- time.Time) { |
| 451 | b.container.bwg.Add(1) | |
| 452 | 451 | go b.forceRefreshImpl(refreshCh) |
| 453 | 452 | } |
| 454 | 453 | |
| 455 | 454 | func (b *Bar) forceRefreshImpl(refreshCh chan<- time.Time) { |
| 456 | defer b.container.bwg.Done() | |
| 457 | 455 | var anyOtherRunning bool |
| 458 | 456 | b.container.traverseBars(func(bar *Bar) bool { |
| 459 | 457 | anyOtherRunning = b != bar && bar.IsRunning() |