Allow external adjustment of parallel search workers - #233
Open
zayenz wants to merge 11 commits into
Open
Conversation
zayenz
force-pushed
the
feature/par-search-worker-adjustments
branch
from
July 28, 2026 08:23
5db14f4 to
5f9d5e0
Compare
zayenz
marked this pull request as ready for review
July 28, 2026 13:57
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Parallel portfolios sometimes need to move a fixed CPU budget between search
engines while those engines keep running. This adds
Search::WorkerControl, acopyable external handle for changing how many of a parallel engine's
pre-created workers may execute.
The initial
threadsvalue remains the fixed resident capacity. A controlstarts with a request between one and that capacity; later
request()callsare thread-safe and non-blocking. Growing wakes parked workers. Shrinking is
cooperative: excess workers finish their current search action before parking.
The control applies to parallel DFS and BAB, including leaf engines owned by
RBS and PBS. PBS deliberately keeps one control per asset; allocation policy
and any portfolio-wide budget invariant remain with the caller.
The handle binds to one logical leaf-engine lifetime. Copies share the same
request state, and an empty handle preserves existing fixed-worker behavior.
Validation includes:
gecode-testbinary;engines plus sampled asynchronous resizing;
portfolio assets; and