This class is used to execute callbacks of completion entries.
More...
#include <rdmapp/executor.h>
|
using | queue_closed_error = work_queue::queue_closed_error |
|
using | callback_fn = std::function< void(struct ibv_wc const &wc)> |
|
using | callback_ptr = callback_fn * |
|
|
| executor (size_t nr_worker=4) |
| Construct a new executor object.
|
|
void | process_wc (struct ibv_wc const &wc) |
| Process a completion entry.
|
|
void | shutdown () |
| Shutdown the executor.
|
|
|
template<class T > |
static callback_ptr | make_callback (T const &cb) |
| Make a callback function that will be called when a completion entry is processed. The callback function will be called in the executor's thread. The lifetime of this pointer is controlled by the executor.
|
|
static void | destroy_callback (callback_ptr cb) |
| Destroy a callback function.
|
|
This class is used to execute callbacks of completion entries.
◆ executor()
rdmapp::executor::executor |
( |
size_t |
nr_worker = 4 | ) |
|
Construct a new executor object.
- Parameters
-
nr_worker | The number of worker threads to use. |
◆ destroy_callback()
void rdmapp::executor::destroy_callback |
( |
callback_ptr |
cb | ) |
|
|
static |
Destroy a callback function.
- Parameters
-
cb | The callback function pointer. |
◆ make_callback()
template<class T >
static callback_ptr rdmapp::executor::make_callback |
( |
T const & |
cb | ) |
|
|
inlinestatic |
Make a callback function that will be called when a completion entry is processed. The callback function will be called in the executor's thread. The lifetime of this pointer is controlled by the executor.
- Template Parameters
-
T | The type of the callback function. |
- Parameters
-
- Returns
- callback_ptr The callback function pointer.
◆ process_wc()
void rdmapp::executor::process_wc |
( |
struct ibv_wc const & |
wc | ) |
|
Process a completion entry.
- Parameters
-
wc | The completion entry to process. |
The documentation for this class was generated from the following files: