splunk / pipelines

Concurrent processing pipelines in Go.
MIT License
21 stars 8 forks source link

bug: WithWaitGroup misuse #36

Closed kalexmills-splunk closed 2 years ago

kalexmills-splunk commented 2 years ago

WithWaitGroup can be easily misused like so:

opt := pipelines.WithWaitGroup(&wg)
out1 := pipelines.Map(ctx, in, f, opt)
out2 := pipelines.Map(ctx, out1, f, opt)

Since &wg was only incremented once on the call to WithWaitGroup... there is a big problem.

kalexmills commented 2 years ago

Closed by #37