|
RESTinio
|
#include <ioctx_on_thread_pool.hpp>
Public Member Functions | |
| ioctx_on_thread_pool_t (const ioctx_on_thread_pool_t &)=delete | |
| ioctx_on_thread_pool_t (ioctx_on_thread_pool_t &&)=delete | |
| template<typename... Io_Context_Holder_Ctor_Args> | |
| ioctx_on_thread_pool_t (std::size_t pool_size, Io_Context_Holder_Ctor_Args &&...ioctx_holder_args) | |
| ~ioctx_on_thread_pool_t () | |
| void | start () |
| void | stop () |
| void | wait () |
| bool | started () const noexcept |
| asio_ns::io_context & | io_context () noexcept |
Private Types | |
| enum | status_t : std::uint8_t { status_t::stopped, status_t::started } |
Private Attributes | |
| Io_Context_Holder | m_ioctx_holder |
| std::vector< std::thread > | m_pool |
| status_t | m_status |
Helper class for creating io_context and running it (via io_context::run()) on a thread pool.
io_context() method). Expected usage scenario is to start and stop it on the same thread.| Io_Context_Holder | A type which actually holds io_context object or a reference to an external io_context object. |
Definition at line 73 of file ioctx_on_thread_pool.hpp.
|
strongprivate |
| Enumerator | |
|---|---|
| stopped | |
| started | |
Definition at line 172 of file ioctx_on_thread_pool.hpp.
|
delete |
|
delete |
|
inline |
Definition at line 80 of file ioctx_on_thread_pool.hpp.
|
inline |
Definition at line 93 of file ioctx_on_thread_pool.hpp.
|
inlinenoexcept |
Definition at line 166 of file ioctx_on_thread_pool.hpp.
|
inline |
Definition at line 103 of file ioctx_on_thread_pool.hpp.
|
inlinenoexcept |
Definition at line 163 of file ioctx_on_thread_pool.hpp.
|
inline |
Definition at line 142 of file ioctx_on_thread_pool.hpp.
|
inline |
Definition at line 151 of file ioctx_on_thread_pool.hpp.
|
private |
Definition at line 174 of file ioctx_on_thread_pool.hpp.
|
private |
Definition at line 175 of file ioctx_on_thread_pool.hpp.
|
private |
Definition at line 176 of file ioctx_on_thread_pool.hpp.
1.8.14