An AsyncBaseOp represents a pending operation. You may set a notification callback or you may use this class's methods directly.
Synopsis
Declared in <folly/io/async/AsyncBase.h>
class AsyncBaseOp;
Description
The op must remain allocated until it is completed or canceled.
Type Aliases
Name |
Description |
Callback invoked when the operation completes. |
Enums
Name |
Description |
Lifecycle state of an operation. |
Member Functions
Name |
Description |
|
Constructors |
|
Destroy the operation. |
|
Deleted copy assignment. |
|
Return this operation as an AsyncIOOp, if it is one. |
|
Return this operation as an IoUringOp, if it is one. |
Get the notification callback from the op. |
|
user data get/set |
|
|
|
|
Initiate a vectored read request. |
|
|
|
Initiate a vectored write request. |
|
Reset the operation for reuse. It is an error to call reset() on an Op that is still pending. |
Retrieve the result of this operation. Returns >=0 on success, ‐errno on failure (that is, using the Linux kernel error reporting conventions). Use checkKernelError (folly/Exception.h) on the result to throw a std::system_error in case of error instead. |
|
Set the callback invoked when the operation completes. |
|
Associate an opaque user data pointer with this operation. |
|
Return the current operation state. |
|
|
Write a human‐readable description of this operation to the stream. |
Static Member Functions
Name |
Description |
Return a human‐readable name for the given file descriptor. |
Protected Member Functions
Protected Data Members
Name |
Description |
Completion callback. |
|
Result of the completed operation. |
|
Current lifecycle state. |
|
Opaque user data pointer. |
Friends
Name |
Description |
Generic C++ interface around Linux IO(io_submit, io_uring) |