-
Notifications
You must be signed in to change notification settings - Fork 3
feat: reentrant callback group #21
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
Signed-off-by: sykwer <sykwer@gmail.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR introduces support for reentrant callback groups in the CallbackIsolatedExecutor, enabling parallel execution of callbacks within the same callback group. The implementation creates a new MultiThreadedExecutorInternal class to handle reentrant callback groups with configurable parallelism (currently hardcoded to 4 threads), while maintaining single-threaded execution for mutually exclusive callback groups.
Changes:
- Added MultiThreadedExecutorInternal class to enable multi-threaded execution for reentrant callback groups
- Modified CallbackIsolatedExecutor to detect and handle reentrant callback groups differently from mutually exclusive ones
- Created a sample ReentrantNode application to demonstrate the reentrant callback group functionality
Reviewed changes
Copilot reviewed 9 out of 9 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
| callback_isolated_executor/include/callback_isolated_executor/multi_threaded_executor_internal.hpp | Defines the MultiThreadedExecutorInternal class with thread synchronization primitives for reentrant callback group execution |
| callback_isolated_executor/src/multi_threaded_executor_internal.cpp | Implements thread pool management, synchronization logic, and executor lifecycle for reentrant callback groups |
| callback_isolated_executor/include/callback_isolated_executor/callback_isolated_executor.hpp | Adds reentrant parallelism configuration and methods to handle different callback group types |
| callback_isolated_executor/src/callback_isolated_executor.cpp | Refactors spin logic to route reentrant and mutually exclusive callback groups to appropriate executors |
| callback_isolated_executor/CMakeLists.txt | Updates build configuration to include new MultiThreadedExecutorInternal implementation |
| cie_sample_application/include/cie_sample_application/reentrant_node.hpp | Defines ReentrantNode header with reentrant callback group and timer declarations |
| cie_sample_application/src/reentrant_node.cpp | Implements ReentrantNode with two timers assigned to a reentrant callback group for testing |
| cie_sample_application/src/reentrant_node_main.cpp | Creates executable entry point for the ReentrantNode sample application |
| cie_sample_application/CMakeLists.txt | Adds build targets for the new reentrant_node component and executable |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
cie_sample_application/include/cie_sample_application/reentrant_node.hpp
Outdated
Show resolved
Hide resolved
cie_sample_application/include/cie_sample_application/reentrant_node.hpp
Outdated
Show resolved
Hide resolved
...ck_isolated_executor/include/callback_isolated_executor/multi_threaded_executor_internal.hpp
Show resolved
Hide resolved
cie_sample_application/include/cie_sample_application/reentrant_node.hpp
Outdated
Show resolved
Hide resolved
…t_node.hpp Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
…t_node.hpp Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Description
TODO
4for now (should be configurable parameter)Related links
How was this PR tested?
Notes for reviewers