Admin Production ni-theme
Current Publication

CmtGetThreadPoolFunctionAttribute

LabWindows/CVI

CmtGetThreadPoolFunctionAttribute

int CmtGetThreadPoolFunctionAttribute (CmtThreadPoolHandle poolHandle, CmtThreadFunctionID threadFunctionID, int attributeID, void *attributeValue);

Purpose

Obtains the value of a thread function attribute.

Parameters

Input
Name Type Description
poolHandle CmtThreadPoolHandle The handle you obtained from CmtNewThreadPool to identify the thread pool.

Pass DEFAULT_THREAD_POOL_HANDLE to specify the default thread pool.
threadFunctionID CmtThreadFunctionID The threadFunctionID that you obtained from CmtScheduleThreadPoolFunction or CmtScheduleThreadPoolFunctionAdv.

Note Note  This ID is not the same ID returned by CmtGetCurrentThreadID.
attributeID int The ID of a thread function attribute.
Output
Name Type Description
attributeValue void * The current value of the attribute.

The data type for this parameter depends on the data type of the attribute you specify for the attributeID parameter. Pass the address of a variable of the same data type of the attribute you pass to attributeID.

In the function panel, if the attribute currently showing in the Attribute ID ring control has named constants as valid values, you can view a list of values by pressing <Enter> on the control.

Return Value

Name Type Description
cmtStatus int 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.

Additional Information

Library: Utility Library

Include file: utility.h

LabWindows/CVI compatibility: LabWindows/CVI 5.5 and later

Examples

Refer to the following examples that use the CmtGetThreadPoolFunctionAttribute function:

  • apps\daqmthread\daqMT.cws

    Open example
  • utility\threading\ThreadPool\MultiPanel\MultiPanel.cws

    Open example
  • utility\threading\ThreadPool\ParallelTestInit\ParallelTestInit.cws

    Open example