Sets the affinity mask for the threads in the pool.
BOOL SetThreadpoolAffinityMask(
PTP_POOL ptpp,
DWORD_PTR affinityMask
)
ptpp
Type: PTP_POOL
[in, out] A TP_POOL structure that defines the thread pool. The CreateThreadpool function returns this structure.
affinityMask
Type: DWORD_PTR
[in] The thread affinity mask.
Type: BOOL
Indicates whether the thread affinity was successfully set. If the function succeeds the return value is TRUE. If the function fails, the return value is FALSE.
The affinity doesn’t apply to already running work items. Worker threads will adjust their affinity mask when picking up the next work item.
Header: Declared in threadpoolapiset.h.
Library: Use kernelx.lib.