From 5df39489600b8910d356cde9aece09381edf547f Mon Sep 17 00:00:00 2001 From: Martin Czygan Date: Tue, 7 Dec 2021 21:17:58 +0100 Subject: batcher: a single call suffices --- skate/zipkey/batch.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'skate') diff --git a/skate/zipkey/batch.go b/skate/zipkey/batch.go index e8ba052..031a1fc 100644 --- a/skate/zipkey/batch.go +++ b/skate/zipkey/batch.go @@ -38,8 +38,8 @@ func NewBatcherSize(gf groupFunc, size int) *Batcher { NumWorkers: runtime.NumCPU(), queue: make(chan []*Group), } + batcher.wg.Add(batcher.NumWorkers) for i := 0; i < batcher.NumWorkers; i++ { - batcher.wg.Add(1) go batcher.worker() } return &batcher -- cgit v1.2.3