Codebase list golang-github-vbauerster-mpb / 55048a3
bar.Aborted method Vladimir Bauer 4 years ago
1 changed file(s) with 11 addition(s) and 0 deletion(s). Raw diff Collapse all Expand all
291291 }
292292 }
293293
294 // Aborted reports whether the bar is in aborted state.
295 func (b *Bar) Aborted() bool {
296 result := make(chan bool)
297 select {
298 case b.operateState <- func(s *bState) { result <- s.aborted }:
299 return <-result
300 case <-b.done:
301 return b.bs.aborted
302 }
303 }
304
294305 // Completed reports whether the bar is in completed state.
295306 func (b *Bar) Completed() bool {
296307 result := make(chan bool)