Condy v1.1.0
C++ Asynchronous System Call Layer for Linux
Loading...
Searching...
No Matches
condy::RuntimeOptions Struct Reference

Runtime options. More...

#include <runtime_options.hpp>

Public Member Functions

Self & event_interval (size_t v)
 Set event interval.
Self & disable_register_ring_fd ()
 Disable register ring fd.
Self & enable_iopoll (bool hybrid=false)
 See IORING_SETUP_IOPOLL.
Self & enable_sqpoll (size_t idle_time_ms=1000, std::optional< uint32_t > cpu=std::nullopt)
 See IORING_SETUP_SQPOLL.
Self & enable_defer_taskrun ()
 See IORING_SETUP_DEFER_TASKRUN.
Self & sq_size (size_t v)
 Set SQ size.
Self & cq_size (size_t v)
 Set CQ size.
Self & enable_attach_wq (Runtime &other)
 See IORING_SETUP_ATTACH_WQ.
Self & enable_coop_taskrun (bool taskrun_flag=false)
 See IORING_SETUP_COOP_TASKRUN.
Self & enable_sqe128 ()
 See IORING_SETUP_SQE128.
Self & enable_cqe32 ()
 See IORING_SETUP_CQE32.
Self & enable_no_mmap (void *buf=nullptr, size_t buf_size=0)
 See IORING_SETUP_NO_MMAP.

Detailed Description

Runtime options.

Options for configuring the behavior of a Runtime instance. Most of them are io_uring setup options. These options should be set before creating the Runtime instance.

Member Function Documentation

◆ cq_size()

Self & condy::RuntimeOptions::cq_size ( size_t v)
inline

Set CQ size.

Parameters
vCQ size

◆ disable_register_ring_fd()

Self & condy::RuntimeOptions::disable_register_ring_fd ( )
inline

Disable register ring fd.

By default, the runtime registers the ring file descriptor with the kernel for performance optimization. This option disables that behavior.

◆ enable_attach_wq()

Self & condy::RuntimeOptions::enable_attach_wq ( Runtime & other)
inline

See IORING_SETUP_ATTACH_WQ.

This option allows the current runtime to share the async worker thread backend with another runtime.

Parameters
otherThe other runtime to attach to.

◆ enable_coop_taskrun()

Self & condy::RuntimeOptions::enable_coop_taskrun ( bool taskrun_flag = false)
inline

See IORING_SETUP_COOP_TASKRUN.

Parameters
taskrun_flagSee IORING_SETUP_TASKRUN_FLAG
Returns
Self&

◆ enable_iopoll()

Self & condy::RuntimeOptions::enable_iopoll ( bool hybrid = false)
inline

See IORING_SETUP_IOPOLL.

Parameters
hybridSee IORING_SETUP_HYBRID_IOPOLL

◆ enable_no_mmap()

Self & condy::RuntimeOptions::enable_no_mmap ( void * buf = nullptr,
size_t buf_size = 0 )
inline

See IORING_SETUP_NO_MMAP.

Parameters
bufBuffer pointer
buf_sizeBuffer size

◆ enable_sqpoll()

Self & condy::RuntimeOptions::enable_sqpoll ( size_t idle_time_ms = 1000,
std::optional< uint32_t > cpu = std::nullopt )
inline

See IORING_SETUP_SQPOLL.

Parameters
idle_time_msIdle time in milliseconds for the sqpoll thread
cpuCPU affinity for the sqpoll thread

◆ event_interval()

Self & condy::RuntimeOptions::event_interval ( size_t v)
inline

Set event interval.

The event interval determines how often the runtime checks for completed events.

Parameters
vThe event interval value

◆ sq_size()

Self & condy::RuntimeOptions::sq_size ( size_t v)
inline

Set SQ size.

Parameters
vSQ size

The documentation for this struct was generated from the following file: