This commit is contained in:
asonix 2022-11-20 12:09:17 -06:00
parent df70a28ca3
commit 13cd308358

View file

@ -45,7 +45,7 @@ pub(crate) fn create_workers(
config: Config, config: Config,
) -> (Manager, JobServer) { ) -> (Manager, JobServer) {
let parallelism = let parallelism =
std::thread::available_parallelism().unwrap_or(NonZeroUsize::try_from(1).expect("nonzero")); std::thread::available_parallelism().unwrap_or_else(|_| NonZeroUsize::try_from(1).expect("nonzero"));
let shared = WorkerConfig::new_managed(Storage::new(ActixTimer), move |queue_handle| { let shared = WorkerConfig::new_managed(Storage::new(ActixTimer), move |queue_handle| {
JobState::new( JobState::new(