boost::corosio::io_context_options

Runtime tuning options for io_context.

Synopsis

struct io_context_options;

Description

All fields have defaults that match the library's built‐in values, so constructing a default io_context_options produces identical behavior to an unconfigured context.

Options that apply only to a specific backend family are silently ignored when the active backend does not support them.

Example

io_context_options opts;
opts.max_events_per_poll  = 256;   // larger batch per syscall
opts.inline_budget_max    = 32;    // more speculative completions
opts.thread_pool_size     = 4;     // more file-I/O workers

io_context ioc(opts);

Data Members

Name

Description

enable_sqpoll

Enable IORING_SETUP_SQPOLL on the io_uring backend.

gqcs_timeout_ms

Maximum GetQueuedCompletionStatus timeout in milliseconds.

inline_budget_initial

Starting inline completion budget per handler chain.

inline_budget_max

Hard ceiling on adaptive inline budget ramp‐up.

max_events_per_poll

Maximum events fetched per reactor poll call.

single_threaded

Enable single‐threaded mode (disable scheduler locking).

sq_thread_cpu

Pin the SQ‐poll kernel thread to this CPU.

sq_thread_idle_ms

SQ‐poll idle timeout in milliseconds.

thread_pool_size

Thread pool size for blocking I/O (file I/O, DNS resolution).

unassisted_budget

Inline budget when no other thread assists the reactor.

See Also

io_context, native_io_context

Created with MrDocs