splunk / pipelines

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

add WithDeferred #26

Closed kalexmills closed 2 years ago

kalexmills commented 2 years ago

Adds WithDeferred, which allows the caller to run an arbitrary function at the end of each goroutine in a pipeline stage. One use of this is to ensure panicking goroutines can be effectively managed.

Also fixes a bug where channels on a worker pool were being closed way too late due to an extra defer. Oops.