beekeeper: an ergonomic workerpool crate
Hi r/rust! I've just published beekeeper, a workerpool library written in Rust.
This crate started as a fork of workerpool, but at this point it's pretty much a re-write and has lots of additional features, including:
- A
Workertrait that is not required to extendDefault - The ability to write workers with mutable state
- Support for custom worker factories
- Stock worker implementations, including support for parallelizing callables (functions or closures)
- Methods for submitting batches of tasks
- The ability to retrieve results as either ordered or unordered iterators, send them to a channel (with support for several alternative channel crates), or store them in the workerpool data structure (called a
Hive) for later retrieval - The ability to pause and resume processing
- (optional) support for automatically retrying failures
- (optional) support for pinning worker threads to CPU cores
I'd love for you to try it out and give feedback about what could be improved.
Enjoy!