My, rather naive, implementation (see main.rs) of Ryan Levicks's Rust threadpool library (see lib.rs), from his tutorial.
Learning to use Arc, Mutex, Atomic variables, and developing understanding of ownership, borrowing and closures.
Assuming you have Rust installed, compile to a release build to reveal actual performance differences from sharing the calculation between different numbers of threads:
- clone repo.
$ cd threadpool
$ cargo build --release
$ cd target/release
$ ./main