Wait godoc update
Vladimir Bauer
8 years ago
| 137 | 137 | } |
| 138 | 138 | } |
| 139 | 139 | |
| 140 | // Wait first waits for all bars to complete, then waits for user provided WaitGroup, if any. | |
| 141 | // It's optional to call, in other words if you don't call Progress.Wait(), | |
| 142 | // it's not guaranteed that all bars will be flushed completely to the underlying io.Writer. | |
| 140 | // Wait first waits for user provided *sync.WaitGroup, if any, | |
| 141 | // then waits far all bars to camplete and finally shutdowns master goroutine. | |
| 142 | // After this method has been called, there is no way to reuse *Progress instance. | |
| 143 | 143 | func (p *Progress) Wait() { |
| 144 | 144 | if p.uwg != nil { |
| 145 | 145 | p.uwg.Wait() |