waitForRequestWithTimeout#
Fully qualified name: isaacsim::ucx::core::waitForRequestWithTimeout
- std::shared_ptr<ucxx::Request> request,
- uint32_t timeoutMs,
- std::string &errorMessage,
- uint32_t pollIntervalUs = 1000,
Wait for a UCX request to complete with timeout.
Polls the request status until it completes, fails, or the timeout expires. If timeoutMs is g_kUcxInfiniteTimeout (UINT32_MAX), waits indefinitely until completion or failure.
The function uses a configurable polling interval which provides a balance between responsiveness and CPU usage. The default interval (1ms) is suitable for most real-time simulation scenarios.
Note
This function is thread-safe if the UCX request object is thread-safe.
Warning
Polling with very short intervals may consume significant CPU when multiple nodes are polling simultaneously. Consider using intervals >= 1000μs (1ms) for non-critical operations.
- Parameters:
request – [in] UCX request to wait for (must not be null)
timeoutMs – [in] Timeout in milliseconds (g_kUcxInfiniteTimeout = infinite wait)
errorMessage – [out] String for storing error messages from checkError()
pollIntervalUs – [in] Polling interval in microseconds (default: 1000)
- Returns:
UcxRequestWaitResult indicating the outcome:
eCompleted: Request finished successfully (UCS_OK)
eTimedOut: Timeout expired before completion (request is cancelled)
eFailed: Null request or UCX error status (not UCS_OK or UCS_INPROGRESS)