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
+1
-5
progress.go
less
more
378
378
pool = append(pool, b)
379
379
}
380
380
381
switch len(pool) {
382
case 0:
383
case 1:
384
heap.Push(&s.bHeap, pool[0])
385
default:
381
if len(pool) != 0 {
386
382
wg.Add(1)
387
383
go func() {
388
384
for _, b := range pool {