Codebase list golang-github-vbauerster-mpb / 894f0aa
wait for user wg last Vladimir Bauer 1 year, 10 months ago
1 changed file(s) with 2 addition(s) and 3 deletion(s). Raw diff Collapse all Expand all
224224 // Wait waits for all bars to complete and finally shutdowns container. After
225225 // this method has been called, there is no way to reuse `*Progress` instance.
226226 func (p *Progress) Wait() {
227 p.bwg.Wait()
228 p.Shutdown()
227229 // wait for user wg, if any
228230 if p.uwg != nil {
229231 p.uwg.Wait()
230232 }
231
232 p.bwg.Wait()
233 p.Shutdown()
234233 }
235234
236235 // Shutdown cancels any running bar immediately and then shutdowns `*Progress`