Skip to content

fix(partitioned)!: bound auto threads by the recommended partition count - #202

Merged
blackopsrepl merged 1 commit into
mainfrom
feature/201-recommended-partitions
Nov 5, 2026
Merged

blackopsrepl merged 1 commit into
mainfrom
feature/201-recommended-partitions

Conversation

@blackopsrepl

Copy link
Copy Markdown
Collaborator

Closes #201. Base main @ 6a9f27c9, one commit ea589bb0.

Gate (fmt, clippy, doc-names file-length facade-reachability public-api deps, rustdoc, examples, workspace all-feature tests, doctests): EXIT 0, 1556 passed, 0 failed, 69 result lines. Mutation check: resolving without the recommendation fails auto_threads_follow_the_recommended_partition_count (pool of 4 instead of 2 on a 12-core host).

`SolutionPartitioner::recommended_partition_count` was documented as the
partitioned phase's input for its thread count, and
`FunctionalPartitioner::with_recommended_count` set it, but nothing read
it. With `thread_count = auto`, partitioned search now runs at most
`min(available cores, partition count, recommended count)` threads; an
explicit count, `none` and `ThreadCount::Unlimited` are unaffected. The
recommendation is a `NonZeroUsize`, since zero partitions at once means
nothing.

Closes #201.

BREAKING CHANGE: `SolutionPartitioner::recommended_partition_count` returns
`Option<NonZeroUsize>`, `FunctionalPartitioner::with_recommended_count`
takes a `NonZeroUsize`, and `ThreadCount::resolve` takes the recommendation
as a second argument.
@blackopsrepl
blackopsrepl merged commit ea589bb into main Nov 5, 2026
12 checks passed
@blackopsrepl
blackopsrepl deleted the feature/201-recommended-partitions branch November 5, 2026 05:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

SolutionPartitioner::recommended_partition_count is never read

1 participant