MultiThreadedExecutor virtual run
Nobody has claimed this yet.
- Dominant language
- C++
- Stars
- 805
- Forks
- 564
- Avg merge
- 1d 17h
- Merged PRs (30d)
- 27
Description
Bug report
Required Info:
- Operating System:
- Ubuntu 20.04
- Installation type:
- From sources
- Version or commit hash:
- Galactic and Humble
- DDS implementation:
- rmw_cyclonedds_cpp
- Client library (if applicable):
- rclcpp
Steps to reproduce issue
The multi-threaded executor declares the void run(size_t this_thread_number); method as protected but does not declares it as a virtual method. This prevents a child class from overriding the run method and prevents improving that method in a case by case basis.
For example, the current implementation is not exception safe which means that if an exception is thrown in the lower layer of rcl implementation (possibly at the rmw layer), the multithreaded executor thread might abnormally terminate since the exception is not handled.
Expected behavior
The run method should be override'able by a child class.
Actual behavior
The run method is not override'able by a child class.
Additional information
Feature request
Feature description
Implementation considerations
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start in rclcpp/include/rclcpp/executors/multi_threaded_executor.hpp at the protected run(size_t this_thread_number) declaration, then inspect its implementation in the corresponding executor source. Confirm how a child class currently interacts with run and define done as allowing that method to be overridden without changing unrelated executor behavior; the payload names no test file.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp
- Domain
- backend
- Issue type
- Feature
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 45/100