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/visibility_control.hpp"
56 size_t number_of_threads = 0,
57 bool yield_before_execute =
false,
58 std::chrono::nanoseconds timeout = std::chrono::nanoseconds(-1));
73 get_number_of_threads();
78 run(
size_t this_thread_number);
83 std::mutex wait_mutex_;
84 size_t number_of_threads_;
85 bool yield_before_execute_;
86 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.