sdl3-bindgen-sys
Safe HaskellNone
LanguageGHC2021

SDL3.Sys.Bindgen.Asyncio

Description

SDL offers a way to perform I/O asynchronously. This allows an app to read or write files without waiting for data to actually transfer; the functions that request I/O never block while the request is fulfilled.

Instead, the data moves in the background and the app can check for results at their leisure.

This is more complicated than just reading and writing files in a synchronous way, but it can allow for more efficiency, and never having framerate drops as the hard drive catches up, etc.

The general usage pattern for async I/O is:

  • Create one or more SDL_AsyncIOQueue objects.
  • Open files with SDL_AsyncIOFromFile.
  • Start I/O tasks to the files with SDL_ReadAsyncIO or SDL_WriteAsyncIO, putting those tasks into one of the queues.
  • Later on, use SDL_GetAsyncIOResult on a queue to see if any task is finished without blocking. Tasks might finish in any order with success or failure.
  • When all your tasks are done, close the file with SDL_CloseAsyncIO. This also generates a task, since it might flush data to disk!

This all works, without blocking, in a single thread, but one can also wait on a queue in a background thread, sleeping until new results have arrived:

  • Call SDL_WaitAsyncIOResult from one or more threads to efficiently block until new tasks complete.
  • When shutting down, call SDL_SignalAsyncIOQueue to unblock any sleeping threads despite there being no new tasks completed.

And, of course, to match the synchronous SDL_LoadFile, we offer SDL_LoadFileAsync as a convenience function. This will handle allocating a buffer, slurping in the file data, and null-terminating it; you still check for results later.

Behind the scenes, SDL will use newer, efficient APIs on platforms that support them: Linux's io_uring and Windows 11's IoRing, for example. If those technologies aren't available, SDL will offload the work to a thread pool that will manage otherwise-synchronous loads without blocking the app.

Best Practices

Simple non-blocking I/O for an app that just wants to pick up data whenever it's ready without losing framerate waiting on disks to spin can use whatever pattern works well for the program. In this case, simply call SDL_ReadAsyncIO, or maybe SDL_LoadFileAsync, as needed. Once a frame, call SDL_GetAsyncIOResult to check for any completed tasks and deal with the data as it arrives.

If two separate pieces of the same program need their own I/O, it is legal for each to create their own queue. This will prevent either piece from accidentally consuming the other's completed tasks. Each queue does require some amount of resources, but it is not an overwhelming cost. Do not make a queue for each task, however. It is better to put many tasks into a single queue. They will be reported in order of completion, not in the order they were submitted, so it doesn't generally matter what order tasks are started.

One async I/O queue can be shared by multiple threads, or one thread can have more than one queue, but the most efficient way if ruthless efficiency is the goal is to have one queue per thread, with multiple threads working in parallel, and attempt to keep each queue loaded with tasks that are both started by and consumed by the same thread. On modern platforms that can use newer interfaces, this can keep data flowing as efficiently as possible all the way from storage hardware to the app, with no contention between threads for access to the same queue.

Written data is not guaranteed to make it to physical media by the time a closing task is completed, unless SDL_CloseAsyncIO is called with its flush parameter set to true, which is to say that a successful result here can still result in lost data during an unfortunately-timed power outage if not flushed. However, flushing will take longer and may be unnecessary, depending on the app's needs. The asynchronous I/O operation structure.

This operates as an opaque handle. One can then request read or write operations on it.

See also
sDL_AsyncIOFromFile

Since: 3.2.0

Synopsis

Documentation

data SDL_AsyncIO Source #

C declaration
struct SDL_AsyncIO, defined at SDL3/SDL_asyncio.h 124:16

newtype SDL_AsyncIOTaskType Source #

Types of asynchronous I/O tasks.

C declaration
enum SDL_AsyncIOTaskType, defined at SDL3/SDL_asyncio.h 131:14

Since: 3.2.0

Constructors

SDL_AsyncIOTaskType 

Fields

Instances

Instances details
Storable SDL_AsyncIOTaskType Source # 
Instance details

Defined in SDL3.Sys.Bindgen.Asyncio

Generic SDL_AsyncIOTaskType Source # 
Instance details

Defined in SDL3.Sys.Bindgen.Asyncio

Associated Types

type Rep SDL_AsyncIOTaskType 
Instance details

Defined in SDL3.Sys.Bindgen.Asyncio

type Rep SDL_AsyncIOTaskType = D1 ('MetaData "SDL_AsyncIOTaskType" "SDL3.Sys.Bindgen.Asyncio" "sdl3-bindgen-sys-0.0.1.0-inplace" 'True) (C1 ('MetaCons "SDL_AsyncIOTaskType" 'PrefixI 'True) (S1 ('MetaSel ('Just "unwrap") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 CUInt)))
Read SDL_AsyncIOTaskType Source # 
Instance details

Defined in SDL3.Sys.Bindgen.Asyncio

Show SDL_AsyncIOTaskType Source # 
Instance details

Defined in SDL3.Sys.Bindgen.Asyncio

Eq SDL_AsyncIOTaskType Source # 
Instance details

Defined in SDL3.Sys.Bindgen.Asyncio

Ord SDL_AsyncIOTaskType Source # 
Instance details

Defined in SDL3.Sys.Bindgen.Asyncio

Prim SDL_AsyncIOTaskType Source # 
Instance details

Defined in SDL3.Sys.Bindgen.Asyncio

CEnum SDL_AsyncIOTaskType Source # 
Instance details

Defined in SDL3.Sys.Bindgen.Asyncio

Associated Types

type CEnumZ SDL_AsyncIOTaskType 
Instance details

Defined in SDL3.Sys.Bindgen.Asyncio

SequentialCEnum SDL_AsyncIOTaskType Source # 
Instance details

Defined in SDL3.Sys.Bindgen.Asyncio

HasFFIType SDL_AsyncIOTaskType Source # 
Instance details

Defined in SDL3.Sys.Bindgen.Asyncio

Associated Types

type FFIType SDL_AsyncIOTaskType 
Instance details

Defined in SDL3.Sys.Bindgen.Asyncio

ReadRaw SDL_AsyncIOTaskType Source # 
Instance details

Defined in SDL3.Sys.Bindgen.Asyncio

StaticSize SDL_AsyncIOTaskType Source # 
Instance details

Defined in SDL3.Sys.Bindgen.Asyncio

WriteRaw SDL_AsyncIOTaskType Source # 
Instance details

Defined in SDL3.Sys.Bindgen.Asyncio

HasCField SDL_AsyncIOTaskType "unwrap" Source # 
Instance details

Defined in SDL3.Sys.Bindgen.Asyncio

Associated Types

type CFieldType SDL_AsyncIOTaskType "unwrap" 
Instance details

Defined in SDL3.Sys.Bindgen.Asyncio

Methods

offset# :: Proxy# SDL_AsyncIOTaskType -> Proxy# "unwrap" -> Int #

ty ~ CUInt => HasField "unwrap" SDL_AsyncIOTaskType ty Source # 
Instance details

Defined in SDL3.Sys.Bindgen.Asyncio

ty ~ CUInt => HasField "unwrap" (Ptr SDL_AsyncIOTaskType) (Ptr ty :: Type) Source # 
Instance details

Defined in SDL3.Sys.Bindgen.Asyncio

type Rep SDL_AsyncIOTaskType Source # 
Instance details

Defined in SDL3.Sys.Bindgen.Asyncio

type Rep SDL_AsyncIOTaskType = D1 ('MetaData "SDL_AsyncIOTaskType" "SDL3.Sys.Bindgen.Asyncio" "sdl3-bindgen-sys-0.0.1.0-inplace" 'True) (C1 ('MetaCons "SDL_AsyncIOTaskType" 'PrefixI 'True) (S1 ('MetaSel ('Just "unwrap") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 CUInt)))
type CEnumZ SDL_AsyncIOTaskType Source # 
Instance details

Defined in SDL3.Sys.Bindgen.Asyncio

type FFIType SDL_AsyncIOTaskType Source # 
Instance details

Defined in SDL3.Sys.Bindgen.Asyncio

type CFieldType SDL_AsyncIOTaskType "unwrap" Source # 
Instance details

Defined in SDL3.Sys.Bindgen.Asyncio

pattern SDL_ASYNCIO_TASK_READ :: SDL_AsyncIOTaskType Source #

A read operation.

C declaration
SDL_ASYNCIO_TASK_READ, defined at SDL3/SDL_asyncio.h 133:5

pattern SDL_ASYNCIO_TASK_WRITE :: SDL_AsyncIOTaskType Source #

A write operation.

C declaration
SDL_ASYNCIO_TASK_WRITE, defined at SDL3/SDL_asyncio.h 134:5

pattern SDL_ASYNCIO_TASK_CLOSE :: SDL_AsyncIOTaskType Source #

A close operation.

C declaration
SDL_ASYNCIO_TASK_CLOSE, defined at SDL3/SDL_asyncio.h 135:5

newtype SDL_AsyncIOResult Source #

Possible outcomes of an asynchronous I/O task.

C declaration
enum SDL_AsyncIOResult, defined at SDL3/SDL_asyncio.h 143:14

Since: 3.2.0

Constructors

SDL_AsyncIOResult 

Fields

Instances

Instances details
Storable SDL_AsyncIOResult Source # 
Instance details

Defined in SDL3.Sys.Bindgen.Asyncio

Generic SDL_AsyncIOResult Source # 
Instance details

Defined in SDL3.Sys.Bindgen.Asyncio

Associated Types

type Rep SDL_AsyncIOResult 
Instance details

Defined in SDL3.Sys.Bindgen.Asyncio

type Rep SDL_AsyncIOResult = D1 ('MetaData "SDL_AsyncIOResult" "SDL3.Sys.Bindgen.Asyncio" "sdl3-bindgen-sys-0.0.1.0-inplace" 'True) (C1 ('MetaCons "SDL_AsyncIOResult" 'PrefixI 'True) (S1 ('MetaSel ('Just "unwrap") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 CUInt)))
Read SDL_AsyncIOResult Source # 
Instance details

Defined in SDL3.Sys.Bindgen.Asyncio

Show SDL_AsyncIOResult Source # 
Instance details

Defined in SDL3.Sys.Bindgen.Asyncio

Eq SDL_AsyncIOResult Source # 
Instance details

Defined in SDL3.Sys.Bindgen.Asyncio

Ord SDL_AsyncIOResult Source # 
Instance details

Defined in SDL3.Sys.Bindgen.Asyncio

Prim SDL_AsyncIOResult Source # 
Instance details

Defined in SDL3.Sys.Bindgen.Asyncio

CEnum SDL_AsyncIOResult Source # 
Instance details

Defined in SDL3.Sys.Bindgen.Asyncio

Associated Types

type CEnumZ SDL_AsyncIOResult 
Instance details

Defined in SDL3.Sys.Bindgen.Asyncio

SequentialCEnum SDL_AsyncIOResult Source # 
Instance details

Defined in SDL3.Sys.Bindgen.Asyncio

HasFFIType SDL_AsyncIOResult Source # 
Instance details

Defined in SDL3.Sys.Bindgen.Asyncio

Associated Types

type FFIType SDL_AsyncIOResult 
Instance details

Defined in SDL3.Sys.Bindgen.Asyncio

ReadRaw SDL_AsyncIOResult Source # 
Instance details

Defined in SDL3.Sys.Bindgen.Asyncio

StaticSize SDL_AsyncIOResult Source # 
Instance details

Defined in SDL3.Sys.Bindgen.Asyncio

WriteRaw SDL_AsyncIOResult Source # 
Instance details

Defined in SDL3.Sys.Bindgen.Asyncio

HasCField SDL_AsyncIOResult "unwrap" Source # 
Instance details

Defined in SDL3.Sys.Bindgen.Asyncio

Associated Types

type CFieldType SDL_AsyncIOResult "unwrap" 
Instance details

Defined in SDL3.Sys.Bindgen.Asyncio

Methods

offset# :: Proxy# SDL_AsyncIOResult -> Proxy# "unwrap" -> Int #

ty ~ CUInt => HasField "unwrap" SDL_AsyncIOResult ty Source # 
Instance details

Defined in SDL3.Sys.Bindgen.Asyncio

ty ~ CUInt => HasField "unwrap" (Ptr SDL_AsyncIOResult) (Ptr ty :: Type) Source # 
Instance details

Defined in SDL3.Sys.Bindgen.Asyncio

type Rep SDL_AsyncIOResult Source # 
Instance details

Defined in SDL3.Sys.Bindgen.Asyncio

type Rep SDL_AsyncIOResult = D1 ('MetaData "SDL_AsyncIOResult" "SDL3.Sys.Bindgen.Asyncio" "sdl3-bindgen-sys-0.0.1.0-inplace" 'True) (C1 ('MetaCons "SDL_AsyncIOResult" 'PrefixI 'True) (S1 ('MetaSel ('Just "unwrap") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 CUInt)))
type CEnumZ SDL_AsyncIOResult Source # 
Instance details

Defined in SDL3.Sys.Bindgen.Asyncio

type FFIType SDL_AsyncIOResult Source # 
Instance details

Defined in SDL3.Sys.Bindgen.Asyncio

type CFieldType SDL_AsyncIOResult "unwrap" Source # 
Instance details

Defined in SDL3.Sys.Bindgen.Asyncio

pattern SDL_ASYNCIO_COMPLETE :: SDL_AsyncIOResult Source #

request was completed without error

C declaration
SDL_ASYNCIO_COMPLETE, defined at SDL3/SDL_asyncio.h 145:5

pattern SDL_ASYNCIO_FAILURE :: SDL_AsyncIOResult Source #

request failed for some reason; check SDL_GetError()!

C declaration
SDL_ASYNCIO_FAILURE, defined at SDL3/SDL_asyncio.h 146:5

pattern SDL_ASYNCIO_CANCELED :: SDL_AsyncIOResult Source #

request was canceled before completing.

C declaration
SDL_ASYNCIO_CANCELED, defined at SDL3/SDL_asyncio.h 147:5

data SDL_AsyncIOOutcome Source #

Information about a completed asynchronous I/O request.

C declaration
struct SDL_AsyncIOOutcome, defined at SDL3/SDL_asyncio.h 155:16

Since: 3.2.0

Constructors

SDL_AsyncIOOutcome 

Fields

  • asyncio :: Ptr SDL_AsyncIO

    what generated this task. This pointer will be invalid if it was closed!

    C declaration
    asyncio, defined at SDL3/SDL_asyncio.h 157:18
  • type' :: SDL_AsyncIOTaskType

    What sort of task was this? Read, write, etc?

    C declaration
    type, defined at SDL3/SDL_asyncio.h 158:25
  • result :: SDL_AsyncIOResult

    the result of the work (success, failure, cancellation).

    C declaration
    result, defined at SDL3/SDL_asyncio.h 159:23
  • buffer :: Ptr Void

    buffer where data was read/written.

    C declaration
    buffer, defined at SDL3/SDL_asyncio.h 160:11
  • offset :: Uint64

    offset in the SDL_AsyncIO where data was read/written.

    C declaration
    offset, defined at SDL3/SDL_asyncio.h 161:12
  • bytes_requested :: Uint64

    number of bytes the task was to read/write.

    C declaration
    bytes_requested, defined at SDL3/SDL_asyncio.h 162:12
  • bytes_transferred :: Uint64

    actual number of bytes that were read/written.

    C declaration
    bytes_transferred, defined at SDL3/SDL_asyncio.h 163:12
  • userdata :: Ptr Void

    pointer provided by the app when starting the task

    C declaration
    userdata, defined at SDL3/SDL_asyncio.h 164:11

Instances

Instances details
Storable SDL_AsyncIOOutcome Source # 
Instance details

Defined in SDL3.Sys.Bindgen.Asyncio

Generic SDL_AsyncIOOutcome Source # 
Instance details

Defined in SDL3.Sys.Bindgen.Asyncio

Show SDL_AsyncIOOutcome Source # 
Instance details

Defined in SDL3.Sys.Bindgen.Asyncio

Eq SDL_AsyncIOOutcome Source # 
Instance details

Defined in SDL3.Sys.Bindgen.Asyncio

ReadRaw SDL_AsyncIOOutcome Source # 
Instance details

Defined in SDL3.Sys.Bindgen.Asyncio

StaticSize SDL_AsyncIOOutcome Source # 
Instance details

Defined in SDL3.Sys.Bindgen.Asyncio

WriteRaw SDL_AsyncIOOutcome Source # 
Instance details

Defined in SDL3.Sys.Bindgen.Asyncio

IsStruct SDL_AsyncIOOutcome Source # 
Instance details

Defined in SDL3.Sys.Bindgen.Asyncio

HasCField SDL_AsyncIOOutcome "asyncio" Source # 
Instance details

Defined in SDL3.Sys.Bindgen.Asyncio

Associated Types

type CFieldType SDL_AsyncIOOutcome "asyncio" 
Instance details

Defined in SDL3.Sys.Bindgen.Asyncio

Methods

offset# :: Proxy# SDL_AsyncIOOutcome -> Proxy# "asyncio" -> Int #

HasCField SDL_AsyncIOOutcome "buffer" Source # 
Instance details

Defined in SDL3.Sys.Bindgen.Asyncio

Associated Types

type CFieldType SDL_AsyncIOOutcome "buffer" 
Instance details

Defined in SDL3.Sys.Bindgen.Asyncio

Methods

offset# :: Proxy# SDL_AsyncIOOutcome -> Proxy# "buffer" -> Int #

HasCField SDL_AsyncIOOutcome "bytes_requested" Source # 
Instance details

Defined in SDL3.Sys.Bindgen.Asyncio

Associated Types

type CFieldType SDL_AsyncIOOutcome "bytes_requested" 
Instance details

Defined in SDL3.Sys.Bindgen.Asyncio

type CFieldType SDL_AsyncIOOutcome "bytes_requested" = Uint64

Methods

offset# :: Proxy# SDL_AsyncIOOutcome -> Proxy# "bytes_requested" -> Int #

HasCField SDL_AsyncIOOutcome "bytes_transferred" Source # 
Instance details

Defined in SDL3.Sys.Bindgen.Asyncio

Associated Types

type CFieldType SDL_AsyncIOOutcome "bytes_transferred" 
Instance details

Defined in SDL3.Sys.Bindgen.Asyncio

type CFieldType SDL_AsyncIOOutcome "bytes_transferred" = Uint64

Methods

offset# :: Proxy# SDL_AsyncIOOutcome -> Proxy# "bytes_transferred" -> Int #

HasCField SDL_AsyncIOOutcome "offset" Source # 
Instance details

Defined in SDL3.Sys.Bindgen.Asyncio

Associated Types

type CFieldType SDL_AsyncIOOutcome "offset" 
Instance details

Defined in SDL3.Sys.Bindgen.Asyncio

Methods

offset# :: Proxy# SDL_AsyncIOOutcome -> Proxy# "offset" -> Int #

HasCField SDL_AsyncIOOutcome "result" Source # 
Instance details

Defined in SDL3.Sys.Bindgen.Asyncio

Associated Types

type CFieldType SDL_AsyncIOOutcome "result" 
Instance details

Defined in SDL3.Sys.Bindgen.Asyncio

Methods

offset# :: Proxy# SDL_AsyncIOOutcome -> Proxy# "result" -> Int #

HasCField SDL_AsyncIOOutcome "type'" Source # 
Instance details

Defined in SDL3.Sys.Bindgen.Asyncio

Associated Types

type CFieldType SDL_AsyncIOOutcome "type'" 
Instance details

Defined in SDL3.Sys.Bindgen.Asyncio

Methods

offset# :: Proxy# SDL_AsyncIOOutcome -> Proxy# "type'" -> Int #

HasCField SDL_AsyncIOOutcome "userdata" Source # 
Instance details

Defined in SDL3.Sys.Bindgen.Asyncio

Associated Types

type CFieldType SDL_AsyncIOOutcome "userdata" 
Instance details

Defined in SDL3.Sys.Bindgen.Asyncio

Methods

offset# :: Proxy# SDL_AsyncIOOutcome -> Proxy# "userdata" -> Int #

ty ~ Ptr SDL_AsyncIO => HasField "asyncio" SDL_AsyncIOOutcome ty Source #

what generated this task. This pointer will be invalid if it was closed!

C declaration
asyncio, defined at SDL3/SDL_asyncio.h 157:18
Instance details

Defined in SDL3.Sys.Bindgen.Asyncio

ty ~ Ptr Void => HasField "buffer" SDL_AsyncIOOutcome ty Source #

buffer where data was read/written.

C declaration
buffer, defined at SDL3/SDL_asyncio.h 160:11
Instance details

Defined in SDL3.Sys.Bindgen.Asyncio

ty ~ Uint64 => HasField "bytes_requested" SDL_AsyncIOOutcome ty Source #

number of bytes the task was to read/write.

C declaration
bytes_requested, defined at SDL3/SDL_asyncio.h 162:12
Instance details

Defined in SDL3.Sys.Bindgen.Asyncio

ty ~ Uint64 => HasField "bytes_transferred" SDL_AsyncIOOutcome ty Source #

actual number of bytes that were read/written.

C declaration
bytes_transferred, defined at SDL3/SDL_asyncio.h 163:12
Instance details

Defined in SDL3.Sys.Bindgen.Asyncio

ty ~ Uint64 => HasField "offset" SDL_AsyncIOOutcome ty Source #

offset in the SDL_AsyncIO where data was read/written.

C declaration
offset, defined at SDL3/SDL_asyncio.h 161:12
Instance details

Defined in SDL3.Sys.Bindgen.Asyncio

ty ~ SDL_AsyncIOResult => HasField "result" SDL_AsyncIOOutcome ty Source #

the result of the work (success, failure, cancellation).

C declaration
result, defined at SDL3/SDL_asyncio.h 159:23
Instance details

Defined in SDL3.Sys.Bindgen.Asyncio

ty ~ SDL_AsyncIOTaskType => HasField "type'" SDL_AsyncIOOutcome ty Source #

What sort of task was this? Read, write, etc?

C declaration
type, defined at SDL3/SDL_asyncio.h 158:25
Instance details

Defined in SDL3.Sys.Bindgen.Asyncio

ty ~ Ptr Void => HasField "userdata" SDL_AsyncIOOutcome ty Source #

pointer provided by the app when starting the task

C declaration
userdata, defined at SDL3/SDL_asyncio.h 164:11
Instance details

Defined in SDL3.Sys.Bindgen.Asyncio

ty ~ Ptr SDL_AsyncIO => HasField "asyncio" (Ptr SDL_AsyncIOOutcome) (Ptr ty :: Type) Source # 
Instance details

Defined in SDL3.Sys.Bindgen.Asyncio

ty ~ Ptr Void => HasField "buffer" (Ptr SDL_AsyncIOOutcome) (Ptr ty :: Type) Source # 
Instance details

Defined in SDL3.Sys.Bindgen.Asyncio

ty ~ Uint64 => HasField "bytes_requested" (Ptr SDL_AsyncIOOutcome) (Ptr ty :: Type) Source # 
Instance details

Defined in SDL3.Sys.Bindgen.Asyncio

ty ~ Uint64 => HasField "bytes_transferred" (Ptr SDL_AsyncIOOutcome) (Ptr ty :: Type) Source # 
Instance details

Defined in SDL3.Sys.Bindgen.Asyncio

ty ~ Uint64 => HasField "offset" (Ptr SDL_AsyncIOOutcome) (Ptr ty :: Type) Source # 
Instance details

Defined in SDL3.Sys.Bindgen.Asyncio

ty ~ SDL_AsyncIOResult => HasField "result" (Ptr SDL_AsyncIOOutcome) (Ptr ty :: Type) Source # 
Instance details

Defined in SDL3.Sys.Bindgen.Asyncio

ty ~ SDL_AsyncIOTaskType => HasField "type'" (Ptr SDL_AsyncIOOutcome) (Ptr ty :: Type) Source # 
Instance details

Defined in SDL3.Sys.Bindgen.Asyncio

ty ~ Ptr Void => HasField "userdata" (Ptr SDL_AsyncIOOutcome) (Ptr ty :: Type) Source # 
Instance details

Defined in SDL3.Sys.Bindgen.Asyncio

type Rep SDL_AsyncIOOutcome Source # 
Instance details

Defined in SDL3.Sys.Bindgen.Asyncio

type CFieldType SDL_AsyncIOOutcome "asyncio" Source # 
Instance details

Defined in SDL3.Sys.Bindgen.Asyncio

type CFieldType SDL_AsyncIOOutcome "buffer" Source # 
Instance details

Defined in SDL3.Sys.Bindgen.Asyncio

type CFieldType SDL_AsyncIOOutcome "bytes_requested" Source # 
Instance details

Defined in SDL3.Sys.Bindgen.Asyncio

type CFieldType SDL_AsyncIOOutcome "bytes_requested" = Uint64
type CFieldType SDL_AsyncIOOutcome "bytes_transferred" Source # 
Instance details

Defined in SDL3.Sys.Bindgen.Asyncio

type CFieldType SDL_AsyncIOOutcome "bytes_transferred" = Uint64
type CFieldType SDL_AsyncIOOutcome "offset" Source # 
Instance details

Defined in SDL3.Sys.Bindgen.Asyncio

type CFieldType SDL_AsyncIOOutcome "result" Source # 
Instance details

Defined in SDL3.Sys.Bindgen.Asyncio

type CFieldType SDL_AsyncIOOutcome "type'" Source # 
Instance details

Defined in SDL3.Sys.Bindgen.Asyncio

type CFieldType SDL_AsyncIOOutcome "userdata" Source # 
Instance details

Defined in SDL3.Sys.Bindgen.Asyncio

data SDL_AsyncIOQueue Source #

A queue of completed asynchronous I/O tasks.

When starting an asynchronous operation, you specify a queue for the new task. A queue can be asked later if any tasks in it have completed, allowing an app to manage multiple pending tasks in one place, in whatever order they complete.

See also
sDL_CreateAsyncIOQueue, sDL_ReadAsyncIO, sDL_WriteAsyncIO, sDL_GetAsyncIOResult, sDL_WaitAsyncIOResult
C declaration
struct SDL_AsyncIOQueue, defined at SDL3/SDL_asyncio.h 183:16

Since: 3.2.0