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

# XAsyncProvider ライブラリの概要

> XAsyncProvider ライブラリの概要

このトピックでは、[XAsyncProvider](/reference/system/xasyncprovider/xasyncprovider_members) ライブラリの目的について説明します。3 つの非同期ライブラリの中で最も高度なもので、タスクの実行方法を扱います。たとえば、`XAsyncProvider` は、[XAsyncBlock](/reference/system/xasync/structs/xasyncblock) を受け取ってタスク キューにコールバックをエンキューする実際の動作を管理し、キャンセル可能性を処理し、結果バッファーをセットアップします。

一般的に、`XAsyncProvider` ライブラリはオプションであり、通常はプロバイダーがすでに提供されているためほとんどの場合には必要ありません。ただし、[Microsoft Game Development Kit (GDK) スタイルで API を作成する場合](/build/core-features/common/async/async-libraries/async-library-xasyncprovider-example-setup-invocation-methods) や、[非同期タスクをキャンセル可能にする場合](/build/core-features/common/async/async-libraries/async-library-xasyncprovider-example-setup-cancelability) など、より高度な動作が必要な場合にこのライブラリを使用できます。

<a id="async_provider_callback" />

#### 非同期プロバイダー コールバック ライブラリ

このライブラリの動作の大部分は、[XAsyncBegin](/reference/system/xasyncprovider/functions/xasyncbegin) 関数に渡される非同期プロバイダー コールバックの実装を中心としています。このコールバックは、非同期呼び出しの開始から終了までの全体の流れを表し、その過程でさまざまな状態変化を処理します。次のスクリーンショットは、プロバイダーがタスクを処理する様子を簡略化して示したものです。

<img src="https://mintcdn.com/microsoft-4404708b/sIrPFR_ir_sNKVEv/images/gdk/features/common/async_provider_diagram.png?fit=max&auto=format&n=sIrPFR_ir_sNKVEv&q=85&s=7ebe8812b5a7a51d77b5544ee3a8be93" alt="プロバイダーがタスクを処理する様子を簡略化して示したスクリーンショット" width="662" height="355" data-path="images/gdk/features/common/async_provider_diagram.png" />

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

* [XAsyncProvider (API 目次)](/reference/system/xasyncprovider/xasyncprovider_members)
  * 関数
    * [XAsyncBegin](/reference/system/xasyncprovider/functions/xasyncbegin)
* [xasync (API 目次)](/reference/system/xasync/xasync_members)
  * 構造体
    * [XAsyncBlock](/reference/system/xasync/structs/xasyncblock)

## 関連項目

[カスタム プロバイダーのセットアップ (例)](/build/core-features/common/async/async-libraries/async-library-xasyncprovider-example-setup-custom-provider)

[呼び出しメソッドのセットアップ (例)](/build/core-features/common/async/async-libraries/async-library-xasyncprovider-example-setup-invocation-methods)

[戻りデータのセットアップ (例)](/build/core-features/common/async/async-libraries/async-library-xasyncprovider-example-setup-return-data)

[キャンセル可能性のセットアップ (例)](/build/core-features/common/async/async-libraries/async-library-xasyncprovider-example-setup-cancelability)

[XAsyncProvider](/reference/system/xasyncprovider/xasyncprovider_members)


## Related topics

- [キャンセル可能性のセットアップ例](/ja-jp/build/core-features/common/async/async-libraries/async-library-xasyncprovider-example-setup-cancelability.md)
- [呼び出しメソッドのセットアップ例](/ja-jp/build/core-features/common/async/async-libraries/async-library-xasyncprovider-example-setup-invocation-methods.md)
- [戻りデータのセットアップ例](/ja-jp/build/core-features/common/async/async-libraries/async-library-xasyncprovider-example-setup-return-data.md)
- [非同期プログラミングの概要](/ja-jp/build/core-features/common/async/async-toc.md)
- [XAsync ライブラリの概要](/ja-jp/build/core-features/common/async/async-libraries/async-library-xasync.md)
