Add thread_view and enhance advanced API functionality - #52
Merged
Conversation
- Introduced `thread_view.hpp` for a non-owning control view over `std::thread`. - Updated integration tests to utilize the new `composite_thread_registry` for merging thread registries. - Refactored runtime registry functions to improve clarity and maintainability. - Enhanced test coverage for advanced API features, including error handling, thread pools, and registry operations. - Updated various tests to reflect changes in the underlying thread registry and error handling mechanisms. - Ensured all headers are self-contained in tests to catch dependency issues early.
- Introduced `scheduled_task` and `scheduled_task_backend` classes for managing cancellable scheduled tasks. - Added `jthread` class to provide a wrapper around `std::jthread` with enhanced functionality. - Created `this_thread` namespace for thread-specific configuration operations. - Developed `thread` class to encapsulate standard thread operations with additional configuration capabilities. - Implemented `thread_view` class for non-owning access to thread properties. - Updated header inclusions to reflect new implementations and reorganized file structure. - Modified integration tests and unit tests to accommodate new classes and functionalities.
- Revise migration instructions from 2.4.0 to 3.0.0, emphasizing the lack of compatibility aliases and binary incompatibility. - Add recommended migration order for transitioning to the new API. - Clarify changes in includes and namespaces, highlighting the new structure of core and advanced headers. - Document core type mappings and emphasize that new types are not aliases of their predecessors. - Update sections on thread state, error handling, and results to reflect the new `result<T>` type. - Provide examples for migrating thread and pool usage to the new API. - Detail changes in scheduling and affinity semantics, including validation of portable values. - Outline the removal of deprecated features and the introduction of new advanced utilities. - Emphasize the need for rebuilding executables and libraries to ensure compatibility with the new runtime.
- Renamed structures and functions to follow a consistent lowercase naming convention (e.g., `BenchmarkWorkloads` to `benchmark_workloads`, `BM_ThreadPool_MinimalTasks` to `bm_thread_pool_minimal_tasks`). - Replaced `volatile` variables with regular variables and added `benchmark::DoNotOptimize` calls to prevent compiler optimizations in benchmark tasks. - Updated session and request structures in web server benchmarks to use lowercase naming. - Improved readability in tests by ensuring consistent formatting and error handling. - Added a new CMake option `THREADSCHEDULE_WARNINGS_AS_ERRORS` to treat warnings as errors during the build process.
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.
thread_view.hppfor a non-owning control view overstd::thread.composite_thread_registryfor merging thread registries.