From 04690a332eefdd162c5e5ba133b82803bb802035 Mon Sep 17 00:00:00 2001 From: Alberto Soragna Date: Sat, 17 May 2025 10:26:57 +0200 Subject: [PATCH 1/2] add note indicating that spin_until_future_complete should be used only with futures generated by ROS entities Signed-off-by: Alberto Soragna --- rclcpp/include/rclcpp/executor.hpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/rclcpp/include/rclcpp/executor.hpp b/rclcpp/include/rclcpp/executor.hpp index 4b75cc8711..137ab77ab2 100644 --- a/rclcpp/include/rclcpp/executor.hpp +++ b/rclcpp/include/rclcpp/executor.hpp @@ -371,6 +371,9 @@ class Executor * If the time spent inside the blocking loop exceeds this timeout, return a TIMEOUT return * code. * \return The return code, one of `SUCCESS`, `INTERRUPTED`, or `TIMEOUT`. + * \note This method will check the future and the timeout only when the executor is woke up. + * If this future is unrelated to an executor's entity, this method will not detect correctly + * when it's completed. */ template FutureReturnCode From 529b616e91c6cd68c39fac5d0a9074ae7491429c Mon Sep 17 00:00:00 2001 From: Alberto Soragna Date: Sat, 23 Aug 2025 11:38:10 +0200 Subject: [PATCH 2/2] fix indentation and improve explanation of consequences Signed-off-by: Alberto Soragna --- rclcpp/include/rclcpp/executor.hpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/rclcpp/include/rclcpp/executor.hpp b/rclcpp/include/rclcpp/executor.hpp index 137ab77ab2..fcc48da055 100644 --- a/rclcpp/include/rclcpp/executor.hpp +++ b/rclcpp/include/rclcpp/executor.hpp @@ -371,9 +371,9 @@ class Executor * If the time spent inside the blocking loop exceeds this timeout, return a TIMEOUT return * code. * \return The return code, one of `SUCCESS`, `INTERRUPTED`, or `TIMEOUT`. - * \note This method will check the future and the timeout only when the executor is woke up. - * If this future is unrelated to an executor's entity, this method will not detect correctly - * when it's completed. + * \note This method will check the future and the timeout only when the executor is woken up. + * If this future is unrelated to an executor's entity, this method will not correctly detect + * when it's completed and therefore may wait forever and never time out. */ template FutureReturnCode