revert defer heap.Push
Vladimir Bauer
3 years ago
| 288 | 288 | var wg sync.WaitGroup |
| 289 | 289 | var popCount int |
| 290 | 290 | rows := s.rows[:0] |
| 291 | pool := make([]*Bar, 0, s.bHeap.Len()) | |
| 291 | 292 | for s.bHeap.Len() > 0 { |
| 292 | 293 | var usedRows int |
| 293 | 294 | b := heap.Pop(&s.bHeap).(*Bar) |
| 314 | 315 | if qb, ok := s.queueBars[b]; ok { |
| 315 | 316 | delete(s.queueBars, b) |
| 316 | 317 | qb.priority = b.priority |
| 317 | defer heap.Push(&s.bHeap, qb) | |
| 318 | pool = append(pool, qb) | |
| 318 | 319 | drop = true |
| 319 | 320 | } else if s.popCompleted && !b.bs.noPop { |
| 320 | 321 | if frame.shutdown > 1 { |
| 330 | 331 | continue |
| 331 | 332 | } |
| 332 | 333 | } |
| 333 | defer heap.Push(&s.bHeap, b) | |
| 334 | pool = append(pool, b) | |
| 335 | } | |
| 336 | ||
| 337 | for _, b := range pool { | |
| 338 | heap.Push(&s.bHeap, b) | |
| 334 | 339 | } |
| 335 | 340 | |
| 336 | 341 | for i := len(rows) - 1; i >= 0; i-- { |