HcommThreadFree
Applicability
Product |
Supported |
|---|---|
Atlas 350 Accelerator Card |
√ |
x |
|
x |
|
x |
|
x |
|
x |
Function
Destroys threads allocated by the HcommThreadAlloc API.
Prototype
1 | HcommResult HcommThreadFree(const ThreadHandle* threads, uint32_t threadNum) |
Parameters
Parameter |
Input/Output |
Description |
|---|---|---|
threads |
Input |
Communication thread handles. For details, see ThreadHandle. |
threadNum |
Input |
Number of communication threads. |
Returns
HcommResult: 0 on success; else, failure.
Restrictions
This API can only destroy threads allocated by the HcommThreadAlloc API.
Example
1 2 3 | ThreadHandle thread[2]; HcommResult ret = HcommThreadAlloc(COMM_ENGINE_AICPU_TS, 2, 3, thread); HcommResult ret = HcommThreadFree(thread, 2); |
Parent topic: Basic Resource Management