Skip to content

feat: add reentrant callback group support to component_container_callback_isolated#27

Merged
sykwer merged 2 commits intomainfrom
feat/component-container-reentrant-support
Jan 27, 2026
Merged

feat: add reentrant callback group support to component_container_callback_isolated#27
sykwer merged 2 commits intomainfrom
feat/component-container-reentrant-support

Conversation

@atsushi421
Copy link
Collaborator

@atsushi421 atsushi421 commented Jan 25, 2026

Description

Add support for reentrant callback groups in ComponentManagerCallbackIsolated, matching the functionality from PR #21.

  • Use MultiThreadedExecutorInternal for reentrant callback groups with configurable parallelism (default 4 threads)
  • Use SingleThreadedExecutor for mutually exclusive callback groups
  • Unify ExecutorWrapper to use std::shared_ptr<rclcpp::Executor> for cleaner code

Related links

How was this PR tested?

  • Build passes
  • Tested with ReentrantNode component - verified parallel execution across 4 threads (tid values differ in logs)

Notes for reviewers

  • reentrant_parallelism_ is currently hardcoded to 4 (same as CallbackIsolatedExecutor)
  • Should be made configurable via parameter in a future PR

…lback_isolated

Add support for reentrant callback groups in ComponentManagerCallbackIsolated,
matching the functionality already present in CallbackIsolatedExecutor (PR #21).

- Use MultiThreadedExecutorInternal for reentrant callback groups with
  configurable parallelism (default 4 threads)
- Use SingleThreadedExecutor for mutually exclusive callback groups
- Unify ExecutorWrapper to use std::shared_ptr<rclcpp::Executor> instead of
  separate executor types
- Update CMakeLists.txt to include multi_threaded_executor_internal.cpp and
  required include directories
@atsushi421 atsushi421 force-pushed the feat/component-container-reentrant-support branch from daaf7c2 to 1af8d6f Compare January 25, 2026 08:47
@atsushi421 atsushi421 requested a review from Copilot January 25, 2026 08:50
Copy link
Contributor

Copilot AI left a 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 adds support for reentrant callback groups to ComponentManagerCallbackIsolated, enabling parallel execution of callbacks within the same callback group using MultiThreadedExecutorInternal.

Changes:

  • Added conditional logic to use MultiThreadedExecutorInternal for reentrant callback groups with 4 threads of parallelism
  • Unified ExecutorWrapper to use base rclcpp::Executor type instead of SingleThreadedExecutor
  • Updated CMakeLists.txt to include multi_threaded_executor_internal.cpp in the build

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 3 comments.

File Description
callback_isolated_executor/src/component_container_callback_isolated.cpp Implements reentrant callback group support with multi-threaded execution and unifies executor wrapper type
callback_isolated_executor/CMakeLists.txt Adds multi_threaded_executor_internal.cpp to build configuration and includes necessary directories

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@sykwer sykwer merged commit cbce5f3 into main Jan 27, 2026
2 checks passed
@sykwer sykwer deleted the feat/component-container-reentrant-support branch January 27, 2026 20:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants