Codebase list golang-github-vbauerster-mpb / 66e043c
WithShutdownNotifier: don't accept closed chan Vladimir Bauer 4 years ago
1 changed file(s) with 5 addition(s) and 1 deletion(s). Raw diff Collapse all Expand all
6161 // have been rendered.
6262 func WithShutdownNotifier(ch chan struct{}) ContainerOption {
6363 return func(s *pState) {
64 s.shutdownNotifier = ch
64 select {
65 case <-ch:
66 default:
67 s.shutdownNotifier = ch
68 }
6569 }
6670 }
6771