15 #ifndef RCLCPP__EXECUTORS__MULTI_THREADED_EXECUTOR_HPP_
16 #define RCLCPP__EXECUTORS__MULTI_THREADED_EXECUTOR_HPP_
23 #include <unordered_map>
25 #include "rclcpp/executor.hpp"
26 #include "rclcpp/macros.hpp"
27 #include "rclcpp/memory_strategies.hpp"
28 #include "rclcpp/visibility_control.hpp"
57 size_t number_of_threads = 0,
58 bool yield_before_execute =
false,
59 std::chrono::nanoseconds timeout = std::chrono::nanoseconds(-1));
74 get_number_of_threads();
79 run(
size_t this_thread_number);
84 std::mutex wait_mutex_;
85 size_t number_of_threads_;
86 bool yield_before_execute_;
87 std::chrono::nanoseconds next_exec_timeout_;
Coordinate the order and timing of available communication tasks.
RCLCPP_PUBLIC MultiThreadedExecutor(const rclcpp::ExecutorOptions &options=rclcpp::ExecutorOptions(), size_t number_of_threads=0, bool yield_before_execute=false, std::chrono::nanoseconds timeout=std::chrono::nanoseconds(-1))
Constructor for MultiThreadedExecutor.
RCLCPP_PUBLIC void spin() override
Versions of rosidl_typesupport_cpp::get_message_type_support_handle that handle adapted types.
Options to be passed to the executor constructor.