Codebase list golang-github-vbauerster-mpb / e51ec4e
heap.Push in another goroutine, if there is something in the stash pool Vladimir Bauer 3 years ago
1 changed file(s) with 1 addition(s) and 5 deletion(s). Raw diff Collapse all Expand all
378378 pool = append(pool, b)
379379 }
380380
381 switch len(pool) {
382 case 0:
383 case 1:
384 heap.Push(&s.bHeap, pool[0])
385 default:
381 if len(pool) != 0 {
386382 wg.Add(1)
387383 go func() {
388384 for _, b := range pool {