Codebase list golang-github-vbauerster-mpb / b21c029
make result chan unbuffered there is no win in making it buffered in this context. Vladimir Bauer 4 years ago
1 changed file(s) with 1 addition(s) and 1 deletion(s). Raw diff Collapse all Expand all
176176
177177 // BarCount returns bars count.
178178 func (p *Progress) BarCount() int {
179 result := make(chan int, 1)
179 result := make(chan int)
180180 select {
181181 case p.operateState <- func(s *pState) { result <- s.bHeap.Len() }:
182182 return <-result