Codebase list golang-github-vbauerster-mpb / 8fb3fdb
initialize shutdownNotifier early Vladimir Bauer 3 years ago
1 changed file(s) with 4 addition(s) and 3 deletion(s). Raw diff Collapse all Expand all
8888 if opt != nil {
8989 opt(s)
9090 }
91 }
92
93 if s.shutdownNotifier == nil {
94 s.shutdownNotifier = make(chan struct{})
9195 }
9296
9397 p := &Progress{
372376
373377 func (s *pState) newTicker(done <-chan struct{}) chan time.Time {
374378 ch := make(chan time.Time)
375 if s.shutdownNotifier == nil {
376 s.shutdownNotifier = make(chan struct{})
377 }
378379 go func() {
379380 var autoRefresh <-chan time.Time
380381 if !s.disableAutoRefresh {