Skip to content

Commit

Permalink
Limit tasks to N-1.
Browse files Browse the repository at this point in the history
Undo task parallelism to N, back to N-1. As it appears there's a bug
that only shows up on some limited toolsets.
  • Loading branch information
grafikrobot committed Aug 28, 2023
1 parent d6ad469 commit 9fb6e6f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/engine/tasks.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -319,7 +319,7 @@ unsigned get_parallelism(int parallelism)
#if B2_USE_STD_THREADS
return parallelism >= 0
? parallelism
: std::min(unsigned(globs.jobs), system_info().cpu_thread_count());
: std::min(unsigned(globs.jobs), system_info().cpu_thread_count()) - 1;
#else
return 0;
#endif
Expand Down

0 comments on commit 9fb6e6f

Please sign in to comment.