> ## Documentation Index
> Fetch the complete documentation index at: https://devdocs.xbox.com/llms.txt
> Use this file to discover all available pages before exploring further.

# PartyManager::GetThreadAffinityMask

> Retrieves the current set of processors on which internal Party library threads will run or are running as an affinity mask.

Retrieves the current set of processors on which internal Party library threads will run or are running as an affinity mask.

## Syntax

```cpp theme={null}
PartyError GetThreadAffinityMask(  
    PartyThreadId threadId,  
    uint64_t* threadAffinityMask  
)  
```

### Parameters

**`threadId`**   [PartyThreadId](/services/playfab/multiplayer/networking/reference/enums/partythreadid)

The type of internal Party library thread for which processor affinity should be retrieved.

**`threadAffinityMask`**   uint64\_t\*\
*output*

The output affinity mask for this type of Party library thread.

### Return value

PartyError

`c_partyErrorSuccess` if the call succeeded or an error code otherwise. The human-readable form of the error code can be retrieved via [GetErrorMessage()](/services/playfab/multiplayer/networking/reference/classes/PartyManager/methods/partymanager_geterrormessage).

## Remarks

This retrieves the current processor affinity for internal Party library threads of a given type. <br /><br /> This method does not require [Initialize()](/services/playfab/multiplayer/networking/reference/classes/PartyManager/methods/partymanager_initialize) to have been called first.   <br /><br /> A reported value of `c_anyProcessor` written to `threadAffinityMask` indicates that the thread is free to run on any processor.

## Requirements

**Header:** Party.h

## See also

[PartyManager](/services/playfab/multiplayer/networking/reference/classes/PartyManager/partymanager)\
[PartyThreadId](/services/playfab/multiplayer/networking/reference/enums/partythreadid)\
[PartyManager::SetThreadAffinityMask](/services/playfab/multiplayer/networking/reference/classes/PartyManager/methods/partymanager_setthreadaffinitymask)


## Related topics

- [PartyManager::SetThreadAffinityMask](/services/playfab/multiplayer/networking/reference/classes/PartyManager/methods/partymanager_setthreadaffinitymask.md)
- [PartyThreadId](/services/playfab/multiplayer/networking/reference/enums/partythreadid.md)
- [PartyManager::Initialize](/services/playfab/multiplayer/networking/reference/classes/PartyManager/methods/partymanager_initialize.md)
- [PartyXblManager::GetThreadAffinityMask](/services/playfab/multiplayer/networking/xblreference/classes/PartyXblManager/methods/partyxblmanager_getthreadaffinitymask.md)
- [chat_manager::get_thread_affinity_mask](/reference/chat/gamechat2/classes/chat_manager/methods/chat_manager_get_thread_affinity_mask.md)
