int CmtReleaseThreadPoolFunctionID (int poolHandle, int threadFunctionID);
Frees a Thread Function ID obtained from CmtScheduleThreadPoolFunction or CmtScheduleThreadPoolFunctionAdv. This function does not unschedule or interrupt a Thread Function that has not been executed or is executing.
If you pass NULL as the threadFunctionID parameter of the CmtScheduleThreadPoolFunction or CmtScheduleThreadPoolFunctionAdv functions, you do not have to call this function. In this case, the thread pool automatically frees the Function ID after it executes the Thread Function.
Input | ||
Name | Type | Description |
poolHandle | integer | The handle you obtained from CmtNewThreadPool to identify the thread pool. Pass DEFAULT_THREAD_POOL_HANDLE to specify the default thread pool. |
threadFunctionID | integer | The threadFunctionID that you obtained from CmtScheduleThreadPoolFunction or CmtScheduleThreadPoolFunctionAdv. |
Name | Type | Description |
CmtStatus | integer | The CmtStatus code that the function call returns. This function returns 0 to indicate success and negative values to indicate failure. Pass the CmtStatus code to CmtGetErrorMessage to get a description of the error code. |