Codebase list golang-github-vbauerster-mpb / ff34943
add (*Progress).Shutdown() Vladimir Bauer 3 years ago
1 changed file(s) with 10 addition(s) and 0 deletion(s). Raw diff Collapse all Expand all
235235 p.once.Do(p.shutdown)
236236
237237 // wait for container to quit
238 p.cwg.Wait()
239 }
240
241 // Shutdown cancels any running bar immediatly and then shutdowns (*Progress)
242 // instance. Normally you shouldn't call this method unless you know what are
243 // you doing. Proper way to shutdown is to call (*Progress).Wait() instead.
244 func (p *Progress) Shutdown() {
245 p.cancel()
246 p.bwg.Wait()
247 p.once.Do(p.shutdown)
238248 p.cwg.Wait()
239249 }
240250