Get the amount of threads in the current process
Cargo.toml
toml
[dependencies]
thread-amount = "0.1"
The code:
```rust use threadamount::threadamount;
use std::thread;
fn main() { let amount = thread_amount();
thread::spawn(move || {
assert_eq!(amount.map(NonZeroUsize::get), Some(1))
});
} ```
Thanks goes to these wonderful people (emoji key):
Tomio 💻 📖 💡 🚇 🚧 |
This project follows the all-contributors specification. Contributions of any kind welcome!
Licensed under the MIT license (LICENSE-MIT or http://opensource.org/licenses/MIT)