drop frame var
Vladimir Bauer
7 years ago
| 262 | 262 | var lineCount int |
| 263 | 263 | for s.bHeap.Len() > 0 { |
| 264 | 264 | bar := heap.Pop(s.bHeap).(*Bar) |
| 265 | frame := <-bar.frameCh | |
| 266 | 265 | defer func() { |
| 267 | 266 | if bar.toShutdown { |
| 268 | 267 | // shutdown at next flush, in other words decrement underlying WaitGroup |
| 281 | 280 | } |
| 282 | 281 | heap.Push(s.bHeap, bar) |
| 283 | 282 | }() |
| 284 | cw.ReadFrom(frame) | |
| 283 | cw.ReadFrom(<-bar.frameCh) | |
| 285 | 284 | lineCount += bar.extendedLines + 1 |
| 286 | 285 | } |
| 287 | 286 | |