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

# TrySetLampArrayWorkerThreadAffinityMask reference

> Sets the processor affinity mask for the LampArray worker thread that dispatches LampArrayCallback and LampArrayStatusCallback invocations.

# TrySetLampArrayWorkerThreadAffinityMask

Sets a processor affinity mask for the LampArray worker thread.

## Syntax

```cpp theme={null}
HRESULT TrySetLampArrayWorkerThreadAffinityMask(
    uint64_t threadAffinityMask);
```

### Parameters

*threadAffinityMask*
Type: uint64\_t

The desired affinity mask for the LampArray worker thread.

### Return value

Type: HRESULT

Function result.

## Remarks

This function will succeed and take effect no more than once per process. Calling this function multiple times within the same process is not supported.

## Requirements

**Header:** LampArray.h

**Library:** xgameplatform.lib

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

## See also

[Lighting API Overview](/build/core-features/common/lighting/gc-lighting-toc)\
[LampArray Basics](/build/core-features/common/lighting/lighting-basics)\
[SetThreadAffinityMask](https://learn.microsoft.com/windows/win32/api/winbase/nf-winbase-setthreadaffinitymask)


## Related topics

- [LampArray API members reference](/reference/lighting/lamparray/lamparray_members.md)
- [LampArrayEnumerationKind enum reference](/reference/lighting/lamparray/enums/lamparrayenumerationkind.md)
- [PFMultiplayerSetThreadAffinityMask](/services/playfab/multiplayer/lobby/playfabmultiplayerreference-cpp/pfmultiplayer/functions/pfmultiplayersetthreadaffinitymask.md)
- [RegisterLampArrayCallback function reference](/reference/lighting/lamparray/functions/registerlamparraycallback.md)
- [RegisterLampArrayStatusCallback function](/reference/lighting/lamparray/functions/registerlamparraystatuscallback.md)
