boost::corosio::native_io_context
An I/O context with devirtualized event loop methods.
Synopsis
template<auto Backend>
class native_io_context
: public io_context
Description
This class template inherits from io_context and shadows all public methods with versions that call the concrete scheduler directly, bypassing virtual dispatch. No new state is added.
A native_io_context IS‐A io_context and can be passed anywhere an io_context& is accepted, in which case virtual dispatch is used transparently.
Example
#include <boost/corosio/native/native_io_context.hpp>
native_io_context<epoll> ctx;
ctx.poll(); // devirtualized call
Types
Name |
Description |
The executor type for this context. |
|
Abstract base class for services owned by an execution context. |
Member Functions
Name |
Description |
|
Constructors |
|
Assignment operators |
Return a pointer to the service of type T, or nullptr. |
|
Return an executor for this context. |
|
Return the memory resource used for coroutine frame allocation. |
|
Return true if a service of type T exists. |
|
Construct and add a service. |
|
Process all ready work items without blocking. |
|
Process at most one ready work item without blocking. |
|
Restart the context after being stopped. |
|
Process all pending work items. |
|
Process work items for the specified duration. |
|
Process at most one pending work item. |
|
Process at most one work item for the specified duration. |
|
Process at most one work item until the specified time. |
|
Process work items until the specified time. |
|
|
|
Signal the context to stop processing. |
|
Return whether the context has been stopped. |
|
Return a pointer to this context if it matches the requested type. |
|
Return a reference to the service of type T, creating it if needed. |
Template Parameters
Name |
Description |
Backend |
A backend tag value (e.g., |
See Also
io_context, epoll_t, iocp_t
Created with MrDocs