| Crates.io | foofighters |
| lib.rs | foofighters |
| version | 0.1.0 |
| created_at | 2025-10-31 15:08:11.789467+00 |
| updated_at | 2025-10-31 15:08:11.789467+00 |
| description | A lightweight, work-stealing thread pool. |
| homepage | https://github.com/lovelindhoni/foofighters |
| repository | https://github.com/lovelindhoni/foofighters |
| max_upload_size | |
| id | 1910172 |
| size | 22,657 |
A lightweight, work-stealing thread pool.
Add this crate using cargo add foofighters:
use foofighters::pool::PoolBuilder;
let pool = PoolBuilder::new()
.set_worker_count(4)
.set_steal_amount(2)
.build();
let submission = pool.spawn(|| {
println!("Hello from a worker!");
});
submission.into_result().unwrap();
Each worker thread runs this cycle:
When the Pool instance is dropped:
cargo test
Or just check compilation without running them as running it will spawn threads:
cargo test --doc --no-run
MIT