logo
Free, unlimited AI code reviews that run on commit
git-lrc git-lrc GitHub Install Now We'd appreciate a star git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt

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

Availability

       This function is available since SDL 3.2.0.

Simple Directmedia Layer                           SDL 3.2.20                         SDL_DestroyAsyncIOQueue(3)

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.

Name

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

Synopsis

#include<SDL3/SDL_asyncio.h>voidSDL_DestroyAsyncIOQueue(SDL_AsyncIOQueue*queue);

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.

See Also