Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
Optionally configures the processor on which internal Party library threads run.
Syntax
PartyError SetThreadAffinityMask(
PartyThreadId threadId,
uint64_t threadAffinityMask
)
Parameters
threadId PartyThreadId
The type of internal Party library thread to configure processor affinity.
threadAffinityMask uint64_t
The 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().
Remarks
This method enables the title to configure the processor affinity for internal Party library threads of a given type. On Windows, the Audio type affects both the PlayFab Party library owned threads and threads owned by XAudio2. For more information, see PartyThreadId.
For all platforms, except PlayStation®, this method may be called at any time before or after Initialize() and takes effect immediately. On PlayStation®, attempting to set the processor affinity for the PartyThreadId Audio thread after calling Initialize() can result in audio rendering failures. It's currently recommended to call this method prior to calling Initialize().
Thread processor settings are persisted across calls to Cleanup() and 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 threadAffinityMask parameter. c_anyProcessor is also the default value the Party library uses if this method is never called.
Requirements
Header: Party.h
See also
PartyManager
PartyThreadId
PartyManager::GetThreadAffinityMask