aboutsummaryrefslogtreecommitdiffstats
path: root/skate/zipkey
diff options
context:
space:
mode:
authorMartin Czygan <martin.czygan@gmail.com>2021-12-07 21:17:58 +0100
committerMartin Czygan <martin.czygan@gmail.com>2021-12-07 21:17:58 +0100
commit5df39489600b8910d356cde9aece09381edf547f (patch)
treecd83deea609e141ba1e969d796a544fef4d3f07c /skate/zipkey
parent14e63308eee071fd67de31638aaa2aa7f05e4a6f (diff)
downloadrefcat-5df39489600b8910d356cde9aece09381edf547f.tar.gz
refcat-5df39489600b8910d356cde9aece09381edf547f.zip
batcher: a single call suffices
Diffstat (limited to 'skate/zipkey')
-rw-r--r--skate/zipkey/batch.go2
1 files changed, 1 insertions, 1 deletions
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