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