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

# GameInput work queues

> GameInput work queues

<a id="introductionSection" />

The `GameInput` API occasionally needs to handle internal asynchronous events, such as input devices being connected or disconnected. These events occur infrequently. However, applications can also register callbacks that might need to be dispatched more often. By default, `GameInput` creates a worker thread that runs at a slightly elevated priority (`THREAD_PRIORITY_ABOVE_NORMAL`) to service these events.

Applications that want more control over when this work takes place and on which thread/processor can manually control processing these events via the [IGameInputDispatcher](/reference/input/gameinput/interfaces/IGameInputDispatcher/igameinputdispatcher) interface. This interface is obtained by calling the [CreateDispatcher](/reference/input/gameinput/interfaces/igameinput/methods/igameinput_createdispatcher) method on the [IGameInput](/reference/input/gameinput/interfaces/igameinput/igameinput) interface. This interface exposes two methods that you can use to manually dispatch work from the `GameInput` internal work queues. Use the [Dispatch](/reference/input/gameinput/interfaces/IGameInputDispatcher/methods/igameinputdispatcher_dispatch) method to dispatch pending work (if any exists) from the `GameInput` work queues. Applications can call this method periodically. Alternatively, they can wait on the handle that's returned from the dispatcher's [OpenWaitHandle](/reference/input/gameinput/interfaces/IGameInputDispatcher/methods/igameinputdispatcher_openwaithandle) method to detect when work has been queued that needs to be dispatched.

While the application holds a reference to the dispatcher interface, it remains in control of dispatching the work. After all the references to the dispatcher interface have been released, `GameInput` then returns to using an internal worker thread to service the events.

<a id="seeAlsoSection" />

## Reference API documentation

* [GameInput (API contents)](/reference/input/gameinput/gameinput_members)

## See also

[GameInput fundamentals](/build/core-features/common/input/overviews/input-fundamentals)

[Advanced GameInput topics](/build/core-features/common/input/advanced/input-advanced-topics)

[Input API reference](/reference/input/gc-reference-input-toc)


## Related topics

- [GameInput callbacks](/build/core-features/common/input/advanced/input-callbacks.md)
- [Advanced GameInput topics](/build/core-features/common/input/advanced/input-advanced-topics.md)
- [Advanced GameInput topics: force feedback and callbacks](/build/core-features/common/input/advanced/index.md)
- [Overview of GameInput](/build/core-features/common/input/overviews/input-overview.md)
- [Force feedback on GameInput](/build/core-features/common/input/advanced/input-forcefeedback.md)
