#include <io_component.h>
◆ IoComponent()
IoComponent::IoComponent |
( |
| ) |
|
|
privatedefault |
◆ backend_name()
std::string IoComponent::backend_name |
( |
| ) |
const |
|
inline |
◆ get_instance()
◆ init()
stdx::expected< void, std::error_code > IoComponent::init |
( |
size_t |
num_worker_threads, |
|
|
const std::string & |
backend_name |
|
) |
| |
initialize io-component.
use IoComponent::reset() to reset the io-component into its initial state
- Parameters
-
num_worker_threads | number of worker-threads to spawn |
backend_name | name of the io-backend |
- See also
- IoComponent::reset()
◆ io_context()
get ref to the io_context.
behaviour is undefined when called before IoComponent::init() and after IoComponent::reset()
◆ io_threads()
std::list< IoThread > & IoComponent::io_threads |
( |
| ) |
|
|
inline |
◆ reset()
void IoComponent::reset |
( |
| ) |
|
reset the io_component into its initial state.
when calling reset() no io-thread SHALL run which can be achieved by
- calling stop() after run() was called.
- not calling run()
◆ run()
void IoComponent::run |
( |
| ) |
|
run the main loop of the io-component.
runs until all no more work is assigned to the mainloop or stopped.
- See also
- IoComponent::stop()
◆ stop()
void IoComponent::stop |
( |
| ) |
|
◆ work_guard()
◆ backend_name_
std::string IoComponent::backend_name_ |
|
private |
◆ io_ctx_
◆ io_threads_
std::list<IoThread> IoComponent::io_threads_ |
|
private |
◆ users_
std::atomic<int> IoComponent::users_ {} |
|
private |
The documentation for this class was generated from the following files: