Codebase list golang-github-vbauerster-mpb / 42b6357
it's ok to setBarPriority even after b.done is closed Vladimir Bauer 4 years ago
1 changed file(s) with 1 addition(s) and 5 deletion(s). Raw diff Collapse all Expand all
259259 // priority, i.e. bar will be on top. If you don't need to set priority
260260 // dynamically, better use BarPriority option.
261261 func (b *Bar) SetPriority(priority int) {
262 select {
263 case <-b.done:
264 default:
265 b.container.setBarPriority(b, priority)
266 }
262 b.container.setBarPriority(b, priority)
267263 }
268264
269265 // Abort interrupts bar's running goroutine. Call this, if you'd like