---
name: "SDL_DestroyAsyncIOQueue"
section: "3"
platform: "linux"
package: "libsdl3-doc"
version: "3.2.10+ds-1"
release: "Debian 13 (Trixie)"
platforms: ["linux"]
url: "https://new.carta.tech/SDL_DestroyAsyncIOQueue"
---

# SDL\_DestroyAsyncIOQueue(3)

Destroy a previously-created async I/O task queue.

## NAME

SDL\_DestroyAsyncIOQueue - Destroy a previously-created async I/O task queue.

## HEADER FILE

Defined in SDL3/SDL\_asyncio.h

## SYNOPSIS

```
#include "SDL3/SDL.h"
```

**void SDL\_DestroyAsyncIOQueue(SDL\_AsyncIOQueue \*queue);**

## DESCRIPTION

If there are still tasks pending for this queue, this call will block until those tasks are finished. All those tasks will be deallocated. Their results will be lost to the app.

Any pending reads from  **SDL\_LoadFileAsync** () that are still in this queue will have their buffers deallocated by this function, to prevent a memory leak.

Once this function is called, the queue is no longer valid and should not be used, including by other threads that might access it while destruction is blocking on pending tasks.

Do not destroy a queue that still has threads waiting on it through

**SDL\_WaitAsyncIOResult** (). You can call

**SDL\_SignalAsyncIOQueue** () first to unblock those threads, and take measures (such as  **SDL\_WaitThread** ()) to make sure they have finished their wait and won't wait on the queue again.

## FUNCTION PARAMETERS

- *queue*

  the task queue to destroy.

## THREAD SAFETY

It is safe to call this function from any thread, so long as no other thread is waiting on the queue with

**SDL\_WaitAsyncIOResult** .

## AVAILABILITY

This function is available since SDL 3.2.0.
