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

# TrySetLampArrayWorkerThreadAffinityMask

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

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](https://docs.xbox.com/build/core-features/common/lighting/gc-lighting-toc.md)\
[LampArray Basics](https://docs.xbox.com/build/core-features/common/lighting/lighting-basics.md)\
[SetThreadAffinityMask](https://learn.microsoft.com/windows/win32/api/winbase/nf-winbase-setthreadaffinitymask)


## Related topics

- [LampArray API members](https://docs.xbox.com/reference/lighting/lamparray/lamparray_members.md)
- [LampArray Basics](https://docs.xbox.com/build/core-features/common/lighting/lighting-basics.md)
- [set_thread_affinity_mask](https://docs.xbox.com/reference/chat/gamechat2/classes/chat_manager/methods/chat_manager_set_thread_affinity_mask.md)
- [RegisterLampArrayCallback](https://docs.xbox.com/reference/lighting/lamparray/functions/registerlamparraycallback.md)
- [LampArrayEnumerationKind Enumeration](https://docs.xbox.com/reference/lighting/lamparray/enums/lamparrayenumerationkind.md)
