AWS IoT Device SDK C:
Jobs
AWS IoT Jobs library
|
Return to main page ↑ |
Wait for a Jobs operation to complete.
This function blocks to wait for a GET PENDING, START NEXT, DESCRIBE, or UPDATE operation to complete. These operations are by default asynchronous; the function calls queue an operation for processing, and a callback is invoked once the operation is complete.
To use this function, the flag AWS_IOT_JOBS_FLAG_WAITABLE must have been set in the operation's function call. Additionally, this function must always be called with any waitable operation to clean up resources.
Regardless of its return value, this function always clean up resources used by the waitable operation. This means operation
is invalidated as soon as this function returns, even if it returns AWS_IOT_JOBS_TIMEOUT or another error.
[in] | operation | Reference to the Jobs operation to wait for. The flag AWS_IOT_JOBS_FLAG_WAITABLE must have been set for this operation. |
[in] | timeoutMs | How long to wait before returning AWS_IOT_JOBS_TIMEOUT. |
[out] | pJobsResponse | The response received from the Jobs service. |
Example: