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

# XAsync 라이브러리 개요

> XAsync 라이브러리 개요

[XAsync](/reference/system/xasync/xasync_members) 라이브러리는 비동기 작업과 해당 콜백을 정의하는 메서드와 데이터를 제공합니다. 주요 비동기 기본 형식인 [XAsyncBlock](/reference/system/xasync/structs/xasyncblock)이 이 라이브러리에서 정의됩니다. 이는 모든 비동기 작업에 필요합니다.

async 블록 외에도 이 라이브러리는 [기본 비동기 호출 시작](/reference/system/xasync/functions/xasyncrun), [비동기 작업 상태 가져오기](/reference/system/xasync/functions/xasyncgetstatus), [작업 취소 시도](/reference/system/xasync/functions/xasynccancel)를 위한 메서드를 제공합니다.

<a id="xasyncblock" />

## XAsyncBlock

[XAsyncBlock](/reference/system/xasync/structs/xasyncblock)은 완료 콜백을 구현하고, 완료 콜백에 데이터를 제공하며, 실행할 작업 큐를 선택하는 데 사용되는 멤버가 포함된 주요 비동기 기본 형식입니다.

async 블록에는 시스템이 런타임 동작에 내부적으로 사용하는 프라이빗 데이터도 포함되어 있습니다. 따라서 이 블록은 여러 활성 작업 간에 공유할 수 없습니다. 시스템은 호출이 활성화되어 있는 동안 이 데이터를 사용하여 비동기 호출을 식별합니다.

```c++ theme={null}
struct XAsyncBlock
{
    /// <summary>
    /// The queue to queue the call on.
    /// </summary>
    XTaskQueueHandle queue;
    
    /// <summary>
    /// Optional context pointer to pass to the callback.
    /// </summary>
    void* context;
    
    /// <summary>
    /// Optional callback that is invoked when the call completes.
    /// </summary>
    XAsyncCompletionRoutine* callback;
    
    /// <summary>
    /// Internal use only.
    /// </summary>
    unsigned char internal[sizeof(void*) * 4];
};
```

## 참고 API 문서

* [XAsync(API 콘텐츠)](/reference/system/xasync/xasync_members)
  * 함수
    * [xasyncrun](/reference/system/xasync/functions/xasyncrun)
    * [xasyncgetstatus](/reference/system/xasync/functions/xasyncgetstatus)
    * [xasynccancel](/reference/system/xasync/functions/xasynccancel)
  * 구조체
    * [XAsyncBlock](/reference/system/xasync/structs/xasyncblock)

## 참고 항목

[비동기 작업 설정](/build/core-features/common/async/async-libraries/async-library-xasync-example-setup-async-task)
[간단한 작업 실행](/build/core-features/common/async/async-libraries/async-library-xasync-example-run-simple-task)
[Microsoft Game Development Kit API 작업 실행](/build/core-features/common/async/async-libraries/async-library-xasync-example-run-gdk-task)
[XAsync 시스템 API 콘텐츠](/reference/system/xasync/xasync_members)


## Related topics

- [XAsync](/ko/reference/system/xasync/xasync_members.md)
- [XAsyncBlock](/ko/reference/system/xasync/structs/xasyncblock.md)
- [XAsyncCancel](/ko/reference/system/xasync/functions/xasynccancel.md)
- [Microsoft Game Development Kit API 작업 실행 예제](/ko/build/core-features/common/async/async-libraries/async-library-xasync-example-run-gdk-task.md)
- [XAsyncGetStatus](/ko/reference/system/xasync/functions/xasyncgetstatus.md)
