> ## 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.

# chat_manager::set_thread_affinity_mask

> chat_manager::set_thread_affinity_mask

# chat\_manager::set\_thread\_affinity\_mask

Optionally configures the processor on which internal Game Chat threads will run.

## Syntax

```cpp theme={null}
void set_thread_affinity_mask(  
    game_chat_thread_id threadId,  
    uint64_t affinityMask  
)  
```

### Parameters

*threadId*   \_In\_\
Type: [game\_chat\_thread\_id](/reference/chat/gamechat2/enums/game_chat_thread_id)

The type of internal Game Chat thread to configure processor affinity.

*affinityMask*   \_In\_\
Type: uint64\_t

The affinity mask representing on which processor(s) the internal Game Chat threads should run.

### Return value

Type: void

## Remarks

This method enables the application to configure the processor affinity for internal Game Chat threads of a given type.

For exclusive resource applications, the threads are guaranteed to run on the specified processors, of which multiple may be enabled.

This method may be called at any time before or after chat\_manager::initialize() and will take effect immediately. Thread processor settings are persisted across calls to chat\_manager::cleanup() and chat\_manager::initialize(). When there are more than 64 cores present, this method always applies to processor group 0.

In order to specify any processor, pass `c_anyProcessor` as the *affinityMask* parameter. This is also the default value Game Chat will use if this method is never called.\
<Note>`c_anyProcessor` is a `constexpr uint64_t` with a value of 0xFFFFFFFFFFFFFFFF.</Note>

## Requirements

**Header:** GameChat2.h

**Supported platforms:** Windows, XBOX One family consoles and XBOX Series consoles

## See also

[chat\_manager](/reference/chat/gamechat2/classes/chat_manager/chat_manager)\
[game\_chat\_thread\_id](/reference/chat/gamechat2/enums/game_chat_thread_id)\
[chat\_manager::get\_thread\_affinity\_mask](/reference/chat/gamechat2/classes/chat_manager/methods/chat_manager_get_thread_affinity_mask)


## Related topics

- [chat_manager::get_thread_affinity_mask](/reference/chat/gamechat2/classes/chat_manager/methods/chat_manager_get_thread_affinity_mask.md)
- [chat_manager::get_thread_processor](/reference/chat/gamechat2/classes/chat_manager/methods/chat_manager_get_thread_processor.md)
- [PartyManager::SetThreadAffinityMask](/services/playfab/multiplayer/networking/reference/classes/PartyManager/methods/partymanager_setthreadaffinitymask.md)
- [PartyXblManager::SetThreadAffinityMask](/services/playfab/multiplayer/networking/xblreference/classes/PartyXblManager/methods/partyxblmanager_setthreadaffinitymask.md)
- [PartyManager::GetThreadAffinityMask](/services/playfab/multiplayer/networking/reference/classes/PartyManager/methods/partymanager_getthreadaffinitymask.md)
