Skip to content

Commit

Permalink
Merge pull request #2552 from subspace/fix-support-single-core-machines
Browse files Browse the repository at this point in the history
Fix support for single-core machines
  • Loading branch information
nazar-pc authored Feb 25, 2024
2 parents ab65eba + 4fe6cd8 commit 7598165
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 7598165

Please sign in to comment.