make result chan unbuffered
there is no win in making it buffered in this context.
Vladimir Bauer
4 years ago
| 176 | 176 |
|
| 177 | 177 |
// BarCount returns bars count.
|
| 178 | 178 |
func (p *Progress) BarCount() int {
|
| 179 | |
result := make(chan int, 1)
|
|
179 |
result := make(chan int)
|
| 180 | 180 |
select {
|
| 181 | 181 |
case p.operateState <- func(s *pState) { result <- s.bHeap.Len() }:
|
| 182 | 182 |
return <-result
|