Convenience class that owns a Reactor running on a dedicated background thread.
More...
#include <reactor.hpp>
|
| static Reactor * | reactor () |
| | get the global Reactor instance.
|
| |
| static int | affinity (int core) |
| | set reactor thread affinity.
|
| |
| static int | affinity () |
| | get reactor thread affinity.
|
| |
| static int | priority (int prio) |
| | set reactor thread priority.
|
| |
| static int | priority () |
| | get reactor thread priority.
|
| |
| static pthread_t | handle () |
| | get the handle of the reactor thread.
|
| |
| static int | mbind (int numa) |
| | bind command queue memory to a NUMA node.
|
| |
| static int | mlock () |
| | lock command queue memory in RAM.
|
| |
Convenience class that owns a Reactor running on a dedicated background thread.
◆ affinity() [1/2]
| int ReactorThread::affinity |
( |
| ) |
|
|
static |
get reactor thread affinity.
- Returns
- affinity or -1 if not pinned.
◆ affinity() [2/2]
| int ReactorThread::affinity |
( |
int | core | ) |
|
|
static |
set reactor thread affinity.
- Parameters
-
| core | thread core affinity (-1 to disable pinning). |
- Returns
- 0 on success, -1 on failure.
◆ handle()
| pthread_t ReactorThread::handle |
( |
| ) |
|
|
static |
get the handle of the reactor thread.
- Returns
- reactor thread handle.
◆ mbind()
| int ReactorThread::mbind |
( |
int | numa | ) |
|
|
static |
bind command queue memory to a NUMA node.
- Parameters
-
- Returns
- 0 on success, -1 on failure.
◆ mlock()
| int ReactorThread::mlock |
( |
| ) |
|
|
static |
lock command queue memory in RAM.
- Returns
- 0 on success, -1 on failure.
◆ priority() [1/2]
| int ReactorThread::priority |
( |
| ) |
|
|
static |
get reactor thread priority.
- Returns
- priority.
◆ priority() [2/2]
| int ReactorThread::priority |
( |
int | prio | ) |
|
|
static |
set reactor thread priority.
- Parameters
-
| prio | thread priority (0 = SCHED_OTHER, 1-99 = SCHED_FIFO). |
- Returns
- 0 on success, -1 on failure.
◆ reactor()
| Reactor * ReactorThread::reactor |
( |
| ) |
|
|
static |
get the global Reactor instance.
- Returns
- reference to the singleton Reactor.
The documentation for this class was generated from the following files: