aboutsummaryrefslogtreecommitdiffstats
path: root/skate
diff options
context:
space:
mode:
Diffstat (limited to 'skate')
-rw-r--r--skate/zipkey/batch.go8
1 files changed, 4 insertions, 4 deletions
diff --git a/skate/zipkey/batch.go b/skate/zipkey/batch.go
index c31909c..9e52f90 100644
--- a/skate/zipkey/batch.go
+++ b/skate/zipkey/batch.go
@@ -27,7 +27,7 @@ func NewBatcher(gf groupFunc) *Batcher {
}
for i := 0; i < batcher.NumWorkers; i++ {
batcher.wg.Add(1)
- go batcher.worker(batcher.queue, &batcher.wg)
+ go batcher.worker()
}
return &batcher
}
@@ -59,10 +59,10 @@ func (b *Batcher) GroupFunc(g *Group) error {
}
// worker will wind down after a first error encountered.
-func (b *Batcher) worker(queue chan []*Group, wg *sync.WaitGroup) {
- defer wg.Done()
+func (b *Batcher) worker() {
+ defer b.wg.Done()
OUTER:
- for batch := range queue {
+ for batch := range b.queue {
for _, g := range batch {
if err := b.gf(g); err != nil {
b.err = err