Skip to content

Commit

Permalink
Fix support for single-core machines
Browse files Browse the repository at this point in the history
  • Loading branch information
nazar-pc committed Feb 25, 2024
1 parent ab65eba commit 4fe6cd8
Showing 1 changed file with 1 addition and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -544,8 +544,7 @@ where
.first()
.expect("Guaranteed to have some CPU cores; qed");

NonZeroUsize::new((cpu_cores.cpu_cores().len() / 2).min(8))
.expect("Guaranteed to have some CPU cores; qed")
NonZeroUsize::new((cpu_cores.cpu_cores().len() / 2).max(1).min(8)).expect("Not zero; qed")
});

let plotting_thread_pool_manager = create_plotting_thread_pool_manager(
Expand Down

0 comments on commit 4fe6cd8

Please sign in to comment.