Module aio

Source
Expand description

POSIX Asynchronous I/O

The POSIX AIO interface is used for asynchronous I/O on files and disk-like devices. It supports read, write, and fsync operations. Completion notifications can optionally be delivered via signals, via the aio_suspend function, or via polling. Some platforms support other completion notifications, such as kevent.

Multiple operations may be submitted in a batch with lio_listio, though the standard does not guarantee that they will be executed atomically.

Outstanding operations may be cancelled with cancel or aio_cancel_all, though the operating system may not support this for all filesystems and devices.

Structs§

AioCb
AIO Control Block.
LioCb
LIO Control Block.
LioCbBuilder
Used to construct LioCb

Enums§

AioCancelStat
Return values for AioCb::cancel and aio_cancel_all
AioFsyncMode
Mode for AioCb::fsync. Controls whether only data or both data and metadata are synced.
LioMode
Mode for lio_listio
LioOpcode
When used with lio_listio, determines whether a given aiocb should be used for a read operation, a write operation, or ignored. Has no effect for any other aio functions.

Functions§

aio_cancel_all
Cancels outstanding AIO requests for a given file descriptor.
aio_suspend
Suspends the calling process until at least one of the specified AioCbs has completed, a signal is delivered, or the timeout has passed.