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

# GameInput ワークキュー

> GameInput ワークキュー

`GameInput` API は、入力デバイスの接続や切断など、内部的な非同期イベントを処理する必要が時折あります。これらのイベントは頻繁には発生しません。しかし、アプリケーションは、より頻繁にディスパッチする必要があるコールバックを登録することもできます。既定では、`GameInput` はこれらのイベントを処理するため、わずかに高い優先度 (`THREAD_PRIORITY_ABOVE_NORMAL`) で実行されるワーカースレッドを作成します。

この作業がいつ、どのスレッド/プロセッサ上で行われるかをより詳細に制御したいアプリケーションは、[IGameInputDispatcher](https://docs.xbox.com/ja-jp/reference/input/gameinput/interfaces/IGameInputDispatcher/igameinputdispatcher.md) インターフェイスを介してこれらのイベントの処理を手動で制御できます。このインターフェイスは、[IGameInput](https://docs.xbox.com/ja-jp/reference/input/gameinput/interfaces/igameinput/igameinput.md) インターフェイスの [CreateDispatcher](https://docs.xbox.com/ja-jp/reference/input/gameinput/interfaces/igameinput/methods/igameinput_createdispatcher.md) メソッドを呼び出すことで取得します。このインターフェイスは、`GameInput` の内部ワークキューから作業を手動でディスパッチするために使用できる 2 つのメソッドを公開しています。[Dispatch](https://docs.xbox.com/ja-jp/reference/input/gameinput/interfaces/IGameInputDispatcher/methods/igameinputdispatcher_dispatch.md) メソッドを使用して、`GameInput` ワークキューから保留中の作業 (存在する場合) をディスパッチします。アプリケーションはこのメソッドを定期的に呼び出すことができます。あるいは、ディスパッチャーの [OpenWaitHandle](https://docs.xbox.com/ja-jp/reference/input/gameinput/interfaces/IGameInputDispatcher/methods/igameinputdispatcher_openwaithandle.md) メソッドから返されるハンドルで待機して、ディスパッチが必要な作業がキューに追加されたときを検出できます。

アプリケーションがディスパッチャーインターフェイスへの参照を保持している間は、作業のディスパッチを制御し続けます。ディスパッチャーインターフェイスへのすべての参照が解放されると、`GameInput` はイベントを処理するために内部ワーカースレッドの使用に戻ります。

## リファレンス API ドキュメント

* [GameInput (API 内容)](https://docs.xbox.com/ja-jp/reference/input/gameinput/gameinput_members.md)

## 関連項目

[GameInput の基礎](https://docs.xbox.com/ja-jp/build/core-features/common/input/overviews/input-fundamentals.md)

[GameInput の高度なトピック](https://docs.xbox.com/ja-jp/build/core-features/common/input/advanced/input-advanced-topics.md)

[Input API リファレンス](https://docs.xbox.com/ja-jp/reference/input/gc-reference-input-toc.md)


## Related topics

- [GameInput の高度なトピック](https://docs.xbox.com/ja-jp/build/core-features/common/input/advanced/input-advanced-topics.md)
- [GameInput コールバック](https://docs.xbox.com/ja-jp/build/core-features/common/input/advanced/input-callbacks.md)
- [GDK ネットワーク スタックとネットワーク API の概要](https://docs.xbox.com/ja-jp/build/console-features/networking/introduction-networking.md)
- [GameInput の高度なトピック: フォース フィードバックとコールバック](https://docs.xbox.com/ja-jp/build/core-features/common/input/advanced/index.md)
- [ネットワーク初期化状態の検出](https://docs.xbox.com/ja-jp/build/console-features/networking/initialization-connectivity-networking.md)
