Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

What threads are running in minimal ROS2 publisher?

Hello, i'm trying to find out what are those 7 threads that i see if i run minimal ROS2 publisher (dashing from apt repos)?

I'm running

ros2 run examples_rclcpp_minimal_publisher publisher_member_function

And see the main process and with six threads.

ps -L -p 3638
  PID   LWP TTY          TIME CMD
 3638  3638 pts/1    00:00:00 publisher_membe
 3638  3639 pts/1    00:00:00 publisher_membe
 3638  3640 pts/1    00:00:00 publisher_membe
 3638  3641 pts/1    00:00:00 publisher_membe
 3638  3642 pts/1    00:00:00 publisher_membe
 3638  3643 pts/1    00:00:00 publisher_membe
 3638  3644 pts/1    00:00:00 publisher_membe

I belive some are spawned by DDS (Fast-RTPS) and some by ROS. By grepping std::thread in rclcpp i see at least signal handler and graph listener.