Function: finalize
Applicability
|
Product |
Supported (√/x) |
|---|---|
|
|
√ |
|
|
√ |
|
|
√ |
|
|
√ |
|
|
√ |
Function Usage
Performs deinitialization to destroy allocations.
A 2000 ms timeout interval is added by default (the maximum timeout is 2000 ms) for the transfer of device logs to ensure the integrity of error- and event-level logs. You can set the ASCEND_LOG_DEVICE_FLUSH_TIMEOUT environment variable to 0 (by using the export ASCEND_LOG_DEVICE_FLUSH_TIMEOUT=0 command) to cancel the timeout.
For details about the ASCEND_LOG_DEVICE_FLUSH_TIMEOUT environment variable, see Log Reference.
Prototype
- C Prototype
1aclError aclFinalize()
- Python Function
1ret = acl.finalize()
Parameter Description
None
Return Value Description
|
Return Value |
Description |
|---|---|
|
ret |
Integer error code: 0 on success; else, failure. |
Restrictions
This API needs to be called explicitly to perfrom deinitialization before the app process exits. Otherwise, an error will be reported, for example, an app process exit error.
You are advised not to call acl.finalize in the destructor call. Otherwise, the process may exit abnormally due to the unknown singleton destruction sequence.