From 78ab3731c9fc0033d6fc0290548e3eeba79c04fb Mon Sep 17 00:00:00 2001 From: Dan Rose Date: Thu, 8 Aug 2019 15:29:10 -0500 Subject: [PATCH] Explain return value of spin_until_future_complete (#792) Signed-off-by: Dan Rose --- rclcpp/include/rclcpp/executor.hpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/rclcpp/include/rclcpp/executor.hpp b/rclcpp/include/rclcpp/executor.hpp index 8471754..72ca879 100644 --- a/rclcpp/include/rclcpp/executor.hpp +++ b/rclcpp/include/rclcpp/executor.hpp @@ -47,6 +47,7 @@ namespace executor /// Return codes to be used with spin_until_future_complete. /** * SUCCESS: The future is complete and can be accessed with "get" without blocking. + * This does not indicate that the operation succeeded; "get" may still throw an exception. * INTERRUPTED: The future is not complete, spinning was interrupted by Ctrl-C or another error. * TIMEOUT: Spinning timed out. */ @@ -210,8 +211,8 @@ public: /// Spin (blocking) until the future is complete, it times out waiting, or rclcpp is interrupted. /** - * \param[in] future The future to wait on. If SUCCESS, the future is safe to access after this - * function. + * \param[in] future The future to wait on. If this function returns SUCCESS, the future can be + * accessed without blocking (though it may still throw an exception). * \param[in] timeout Optional timeout parameter, which gets passed to Executor::spin_node_once. * `-1` is block forever, `0` is non-blocking. * If the time spent inside the blocking loop exceeds this timeout, return a TIMEOUT return