rclcpp
rclcpp copied to clipboard
MultiThreadedExecutor CPU affinity aware
Feature request
Feature description
MultiThreadedExecutor should honor CPU affinity to be set by user application for process space, including inherited affinity.
https://github.com/ros2/rclpy/pull/1031 includes this configuration, so the same behavior should go to rclcpp.
Using single thread with MultiThreadedExecutor will print the warning since it is not recommended, to avoid the possible problem which is described https://github.com/ros2/rclcpp/issues/2029.
But if the CPU affinity is set by user application, it will honor that configuration.
Implementation considerations
- Implement abstracted function in
rcutilsso that we can conceal the platform implementation in client libraries.
Related PRs
- https://github.com/ros2/rclpy/pull/1031
- https://github.com/ros2/rclcpp/pull/2030