Function: synchronize_event_with_timeout
Applicability
|
Product |
Supported (√/x) |
|---|---|
|
|
√ |
|
|
√ |
|
|
√ |
|
|
√ |
|
|
√ |
Function Usage
Blocks the current thread until all tasks captured by the event are complete. For details, see the event capture details in acl.rt.record_event.
This API is enhanced based on acl.rt.synchronize_event. You can set permanent waiting or a specific timeout period. If a specific timeout period is configured, the app automatically exits when an exception occurs.
Prototype
- C Prototype
1aclError aclrtSynchronizeEventWithTimeout(aclrtEvent event, int32_t timeout)
- Python Function
1ret = acl.rt.synchronize_event_with_timeout(event, timeout)
Parameter Description
|
Parameter |
Description |
|---|---|
|
event |
Int, event object pointer address to be waited for. |
|
timeout |
Int, API timeout interval. The options are as follows:
|
Return Value Description
|
Return Value |
Description |
|---|---|
|
ret |
Int, error code: 0 on success; else, failure. |