2 unstable releases
0.2.0 | Sep 10, 2023 |
---|---|
0.1.0 | Sep 9, 2023 |
#1253 in Concurrency
12KB
206 lines
TaskPile
⚠️ Warning ☣️
Homemade, hand-rolled code ahead. Experimental. May not function as advertised.
A threadpool implementation. Heavily inspired by the implementation in the rust book and the threadpool crate.
lib.rs
:
TaskPile
A simple threadpool implementation. Use TaskPile::new to create the pool of a sepcific size and add work to it.
If a panic occurs, the implementation spanws a new thread to take the place of the panicked one.
Dropping the TaskPile
instance will wait for active and queued work to finish before cleaning
up resources