|
Condy v1.6.0
C++ Asynchronous System Call Layer for Linux
|
The event loop runtime for executing asynchronous. More...
#include <runtime.hpp>
Public Member Functions | |
| Runtime (const RuntimeOptions &options={}) | |
| Construct a new Runtime object. | |
| void | allow_exit () noexcept |
| Allow the runtime to exit when there are no pending works. | |
| void | run () |
| Run the runtime event loop in the current thread. | |
| auto & | fd_table () noexcept |
| Get the file descriptor table of the runtime. | |
| auto & | buffer_table () noexcept |
| Get the buffer table of the runtime. | |
| auto & | settings () noexcept |
| Get the ring settings of the runtime. | |
The event loop runtime for executing asynchronous.
This class provides a single-threaded runtime for executing asynchronous tasks using io_uring. It manages the event loop, scheduling, and execution of tasks, as well as inter-runtime notifications.
Definition at line 111 of file runtime.hpp.
|
inline |
Construct a new Runtime object.
| options | Options for configuring the runtime. |
Definition at line 117 of file runtime.hpp.
|
inlinenoexcept |
Allow the runtime to exit when there are no pending works.
By default, the runtime will keep running even if there are no pending works. Calling this function will allow the runtime to exit once all pending works are completed.
Definition at line 225 of file runtime.hpp.
|
inlinenoexcept |
Get the buffer table of the runtime.
Definition at line 359 of file runtime.hpp.
|
inlinenoexcept |
Get the file descriptor table of the runtime.
Definition at line 353 of file runtime.hpp.
|
inline |
Run the runtime event loop in the current thread.
This function starts the event loop of the runtime in the current thread. It will process events, schedule tasks, and handle notifications until there are no pending works left.
| std::runtime_error | If the runtime is already running or has been stopped. |
Definition at line 301 of file runtime.hpp.
|
inlinenoexcept |
Get the ring settings of the runtime.
Definition at line 365 of file runtime.hpp.