Refactor thread management and configuration - #53
Open
Katze719 wants to merge 2 commits into
Open
Conversation
- Introduced `worker_count` class to encapsulate worker count logic and validation. - Updated `thread_view` to utilize new backend and control mechanisms for thread management. - Enhanced thread configuration with explicit methods for setting scheduling and affinity. - Replaced direct integer usage for worker counts and scheduling values with strong types. - Added tests for new worker count validation and thread configuration behaviors. - Updated existing tests to align with new API changes and ensure correctness.
- Updated thread_config accessors to use consistent naming conventions (get_name, get_scheduling, get_affinity). - Removed default constructor and validity check from thread_id, enforcing positive thread IDs. - Enhanced thread_pool with clearer accessor names and improved shutdown handling. - Introduced global_registry_binding for scoped management of thread_registry, replacing use_global_registry. - Updated integration tests to reflect changes in registry binding and thread management. - Refactored callable tests to align with new error callback structure. - Improved advanced API tests to validate new thread pool behaviors and configurations. - Ensured compatibility with C++20 features, including jthread and std::variant.
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.
worker_countclass to encapsulate worker count logic and validation.thread_viewto utilize new backend and control mechanisms for thread management.