Generic C++ interface around Linux IO(io_submit, io_uring)
Synopsis
Declared in <folly/io/async/AsyncBase.h>
class AsyncBase;
Type Aliases
Name |
Description |
The operation type managed by this context. |
Enums
Name |
Description |
Whether the context exposes a pollable completion file descriptor. |
Member Functions
Name |
Description |
|
Constructors |
|
Destroy the context. |
|
Deleted copy assignment. |
Cancel all pending requests and return them; the returned range is valid until the next call to cancel(). |
|
Return the maximum number of requests that can be kept outstanding at any one time. |
|
|
Initialize context |
Return the number of pending requests. |
|
If POLLABLE, call instead of wait after the file descriptor returned by pollFd() became readable. The returned range is valid until the next call to pollCompleted(). |
|
If POLLABLE, return a file descriptor that can be passed to poll / epoll and will become readable when any async IO operations have completed. If NOT_POLLABLE, return ‐1. |
|
|
|
Return the accumulative number of submitted I/O, since this object has been created. |
|
Wait for at least minRequests to complete. Returns the requests that have completed; the returned range is valid until the next call to wait(). minRequests may be 0 to not block. |
Protected Enums
Name |
Description |
Whether a wait should collect completed or canceled operations. |
Protected Member Functions
Name |
Description |
Mark an operation as canceled. |
|
Mark an operation as completed with the given result. |
|
Decrease the pending request count by the given amount. |
|
|
Wait for operations to complete or be canceled. |
|
Drain readiness notifications from the poll file descriptor. |
Return whether the context has been initialized. |
|
|
Submit a single operation to the underlying backend. |
|
Submit a range of operations to the underlying backend. |
Protected Data Members
Name |
Description |
Buffer of canceled operations. |
|
Maximum concurrent pending requests. |
|
Buffer of completed operations. |
|
Guards initialization. |
|
Whether the context is initialized. |
|
Number of pending requests. |
|
Completion file descriptor, or ‐1. |
|
Configured poll mode. |
|
Total number of submitted requests. |