join 1.0
lightweight network framework library
Loading...
Searching...
No Matches
join::BasicProactorThread Class Reference

Convenience class that owns a Proactor running on a dedicated background thread. More...

#include <proactor.hpp>

Static Public Member Functions

static BasicProactorproactor ()
 get the Proactor instance owned by the singleton ProactorThread.
 
static int affinity (int core)
 set proactor thread affinity.
 
static int affinity () noexcept
 get proactor thread affinity.
 
static int priority (int prio)
 set proactor thread scheduling priority.
 
static int priority () noexcept
 get proactor thread scheduling priority.
 
static pthread_t handle () noexcept
 get the native handle of the proactor thread.
 
static int mlock () noexcept
 lock proactor command queue memory in RAM.
 

Detailed Description

Convenience class that owns a Proactor running on a dedicated background thread.

Member Function Documentation

◆ affinity() [1/2]

static int join::BasicProactorThread::affinity ( )
inlinestaticnoexcept

get proactor thread affinity.

Returns
core index, or -1 if not pinned.

◆ affinity() [2/2]

static int join::BasicProactorThread::affinity ( int core)
inlinestatic

set proactor thread affinity.

Parameters
coreCPU core (-1 to disable pinning).
Returns
0 on success, -1 on failure.

◆ handle()

static pthread_t join::BasicProactorThread::handle ( )
inlinestaticnoexcept

get the native handle of the proactor thread.

Returns
pthread_t handle.

◆ mlock()

static int join::BasicProactorThread::mlock ( )
inlinestaticnoexcept

lock proactor command queue memory in RAM.

Returns
0 on success, -1 on failure.

◆ priority() [1/2]

static int join::BasicProactorThread::priority ( )
inlinestaticnoexcept

get proactor thread scheduling priority.

Returns
current priority.

◆ priority() [2/2]

static int join::BasicProactorThread::priority ( int prio)
inlinestatic

set proactor thread scheduling priority.

Parameters
prio0 = SCHED_OTHER, 1-99 = SCHED_FIFO.
Returns
0 on success, -1 on failure.

◆ proactor()

static BasicProactor & join::BasicProactorThread::proactor ( )
inlinestatic

get the Proactor instance owned by the singleton ProactorThread.

Returns
reference to the Proactor.

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