Closed joel-rieke closed 2 years ago
My bad. I found a way to close everything down.
explain? maybe? This will help in the future im certain
Certainment Mathieu.
I had initialize mpb using: ourMpb := mpb.NewWithContext(customContext, mpb.WithWidth(10), mpb.WithWaitGroup(&customWg))
Prior to ourMpb.Wait(), we needed to call customWg.Done(), which we had not done.
Presently we have a long running multi progress bar. Often times several methods associated with different bars fail to complete -- but overall, we don't want to keep going because we know they likely won't ever complete.
At the end, it would be great to have a function that essentially says, I know things haven't gone right, but we're going to shut down anyway and completely clean up the multi progress bar (without exiting the process). We can't let it keep multi progress bar running because several of the bars are still busily waiting.
Calling mpb.Wait() just hangs for us and there doesn't seem to be any way to forcefully shut it down. We tried using a cancellable context, but that does not seem to do the job as I believe one or more WaitGroups in the Wait() method are hanging.
shutdown method is private and I wonder if that were made public if that would be enough to forcefully shut down a multi progress bar?