pub enum Threads {
All,
Specific(usize),
}
impl Into<usize> for Threads {
fn into(self) -> usize {
match self {
Threads::All => std::thread::available_parallelism()
.expect("could not acquire machine core number")
.get(),
Threads::Specific(number) => number,
}
}
}