News for hackers. Stuff that matters.
Re:Show HN: Golang Throttler – smart WaitGroups to easily ma... by derekperkins on Saturday March 07, 2015 @01:59PM (#9162685)
This is my first time posting code to Hacker News. I'd love to get any feedback on the quality and usefulness of the code as a package.

Throttler fills the gap between sync.WaitGroup and manually monitoring your goroutines with channels. The API is almost identical to Wait Groups, but it allows you to set a max number of workers that can be running simultaneously. It uses channels internally to block until a job completes by calling Done() or until all jobs have been completed.

See a fully functional example on the playground at http://bit.ly/throttler-docs

There are no comments on this comment yet.