Admin Production ni-theme
Current Publication

CmtSetThreadPoolAttribute

LabWindows/CVI

CmtSetThreadPoolAttribute

int CmtSetThreadPoolAttribute (CmtThreadPoolHandle poolHandle, int attributeID, ...);

Purpose

Sets the value of thread pool attributes.

You can set certain attributes only before any threads in the thread pool are created. If you want to modify these attributes, you must do so before you schedule any functions in the thread pool. You cannot set any attributes of the default thread pool.

Parameters

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

Do not pass DEFAULT_THREAD_POOL_HANDLE to this function.
attributeID int The ID of a thread pool attribute.
attributeValue ... The value to which you want to set the attribute.

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

Example

Refer to utility\threading\ThreadPool\MultiPanel\MultiPanel.cws for an example of using the CmtSetThreadPoolAttribute function.