Expand description
Utility functions for simple use cases.
In all cases, the number of threads is specified as a parameter, and the function takes care of
creating the Hive (with channel-based task queues), submitting tasks,
collecting results, and shutting down the Hive properly.
Functionsยง
- map
- Convenience function that creates a
Hivewithnum_threadsworker threads that execute the provided callable on the provided inputs and returns aVecof the results. - try_map
- Convenience function that creates a
Hivewithnum_threadsworker threads that execute the provided callable on the provided inputs and returns aVecof the results, or an error if any of the tasks failed.