sdl.asyncio

SDL3 Asynchronous I/O

Members

Enums

SDL_AsyncIOResult
enum SDL_AsyncIOResult

Possible outcomes of an asynchronous I/O task.

SDL_AsyncIOTaskType
enum SDL_AsyncIOTaskType

Types of asynchronous I/O tasks.

Functions

SDL_AsyncIOFromFile
SDL_AsyncIO* SDL_AsyncIOFromFile(const(char)* file, const(char)* mode)

Use this function to create a new SDL_AsyncIO object for reading from and/or writing to a named file.

SDL_CloseAsyncIO
bool SDL_CloseAsyncIO(SDL_AsyncIO* asyncio, bool flush, SDL_AsyncIOQueue* queue, void* userdata)

Close and free any allocated resources for an async I/O object.

SDL_CreateAsyncIOQueue
SDL_AsyncIOQueue* SDL_CreateAsyncIOQueue()

Create a task queue for tracking multiple I/O operations.

SDL_DestroyAsyncIOQueue
void SDL_DestroyAsyncIOQueue(SDL_AsyncIOQueue* queue)

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

SDL_GetAsyncIOResult
bool SDL_GetAsyncIOResult(SDL_AsyncIOQueue* queue, SDL_AsyncIOOutcome* outcome)

Query an async I/O task queue for completed tasks.

SDL_GetAsyncIOSize
Sint64 SDL_GetAsyncIOSize(SDL_AsyncIO* asyncio)

Use this function to get the size of the data stream in an SDL_AsyncIO.

SDL_LoadFileAsync
bool SDL_LoadFileAsync(const(char)* file, SDL_AsyncIOQueue* queue, void* userdata)

Load all the data from a file path, asynchronously.

SDL_ReadAsyncIO
bool SDL_ReadAsyncIO(SDL_AsyncIO* asyncio, void* ptr, Uint64 offset, Uint64 size, SDL_AsyncIOQueue* queue, void* userdata)

Start an async read.

SDL_SignalAsyncIOQueue
void SDL_SignalAsyncIOQueue(SDL_AsyncIOQueue* queue)

Wake up any threads that are blocking in SDL_WaitAsyncIOResult.

SDL_WaitAsyncIOResult
bool SDL_WaitAsyncIOResult(SDL_AsyncIOQueue* queue, SDL_AsyncIOOutcome* outcome, Sint32 timeoutMS)

Block until an async I/O task queue has a completed task.

SDL_WriteAsyncIO
bool SDL_WriteAsyncIO(SDL_AsyncIO* asyncio, void* ptr, Uint64 offset, Uint64 size, SDL_AsyncIOQueue* queue, void* userdata)

Start an async write.

Structs

SDL_AsyncIO
struct SDL_AsyncIO

The asynchronous I/O operation structure.

SDL_AsyncIOOutcome
struct SDL_AsyncIOOutcome

Information about a completed asynchronous I/O request.

SDL_AsyncIOQueue
struct SDL_AsyncIOQueue

A queue of completed asynchronous I/O tasks.

See Also

Meta

License

Subject to the terms of the Zlib License, as written in the LICENSE file.

Authors

Luna Nielsen