Completed deprecated, use Complete()
Vladimir Bauer
9 years ago
| 255 | 255 | } |
| 256 | 256 | } |
| 257 | 257 | |
| 258 | // Completed signals to the bar, that process has been completed. | |
| 258 | // Complete signals to the bar, that process has been completed. | |
| 259 | 259 | // You should call this method when total is unknown and you've reached the point |
| 260 | // of process completion. | |
| 261 | func (b *Bar) Completed() { | |
| 260 | // of process completion. If you don't call this method, it will be called | |
| 261 | // implicitly, upon p.Stop() call. | |
| 262 | func (b *Bar) Complete() { | |
| 262 | 263 | select { |
| 263 | 264 | case b.completeReqCh <- struct{}{}: |
| 264 | 265 | case <-b.done: |
| 265 | 266 | return |
| 266 | 267 | } |
| 268 | } | |
| 269 | ||
| 270 | // Completed: deprecated! Use b.Complete() | |
| 271 | func (b *Bar) Completed() { | |
| 272 | b.Complete() | |
| 267 | 273 | } |
| 268 | 274 | |
| 269 | 275 | func (b *Bar) flushed() { |