aclrtStreamWaitEventWithTimeout
Applicable Products
Product |
Supported |
|---|---|
√ |
|
√ |
|
√ |
|
√ |
|
√ |
|
√ |
Function
Blocks a specified stream until the specified event is complete. This is an asynchronous API.
This API is enhanced based on aclrtStreamWaitEvent and allows you to set the timeout interval.
Prototype
1 | aclError aclrtStreamWaitEventWithTimeout(aclrtStream stream, aclrtEvent event, int32_t timeout) |
Parameters
Parameter |
Input/Output |
Description |
|---|---|---|
stream |
Input |
Stream. For details about the type definition, see aclrtStream. For stream synchronization, for example, Stream2 waits for Stream1, set this parameter to Stream2. |
event |
Input |
Event to wait on. For details about the type definition, see aclrtEvent. |
timeout |
Input |
Timeout interval. The value can be:
|
Returns
0 on success; otherwise, failure. For details, see aclError.