diff --git a/container_option.go b/container_option.go index 92bddba..77b22f2 100644 --- a/container_option.go +++ b/container_option.go @@ -56,15 +56,11 @@ } } -// WithShutdownNotifier provided chanel will be closed, after all bars -// have been rendered. -func WithShutdownNotifier(ch chan struct{}) ContainerOption { +// WithShutdownNotifier value of type `[]*mpb.Bar` will be send into provided +// channel upon container shutdown. +func WithShutdownNotifier(ch chan<- interface{}) ContainerOption { return func(s *pState) { - select { - case <-ch: - default: - s.shutdownNotifier = ch - } + s.shutdownNotifier = ch } }