Explain return value of spin_until_future_complete (#792)
Signed-off-by: Dan Rose <dan@digilabs.io>
This commit is contained in:
parent
41a99b64d3
commit
78ab3731c9
1 changed files with 3 additions and 2 deletions
|
@ -47,6 +47,7 @@ namespace executor
|
||||||
/// Return codes to be used with spin_until_future_complete.
|
/// Return codes to be used with spin_until_future_complete.
|
||||||
/**
|
/**
|
||||||
* SUCCESS: The future is complete and can be accessed with "get" without blocking.
|
* 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.
|
* INTERRUPTED: The future is not complete, spinning was interrupted by Ctrl-C or another error.
|
||||||
* TIMEOUT: Spinning timed out.
|
* TIMEOUT: Spinning timed out.
|
||||||
*/
|
*/
|
||||||
|
@ -210,8 +211,8 @@ public:
|
||||||
|
|
||||||
/// Spin (blocking) until the future is complete, it times out waiting, or rclcpp is interrupted.
|
/// 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
|
* \param[in] future The future to wait on. If this function returns SUCCESS, the future can be
|
||||||
* function.
|
* accessed without blocking (though it may still throw an exception).
|
||||||
* \param[in] timeout Optional timeout parameter, which gets passed to Executor::spin_node_once.
|
* \param[in] timeout Optional timeout parameter, which gets passed to Executor::spin_node_once.
|
||||||
* `-1` is block forever, `0` is non-blocking.
|
* `-1` is block forever, `0` is non-blocking.
|
||||||
* If the time spent inside the blocking loop exceeds this timeout, return a TIMEOUT return
|
* If the time spent inside the blocking loop exceeds this timeout, return a TIMEOUT return
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue