5 #include <restinio/asio_include.hpp> 7 #include <restinio/exception.hpp> 54 asio_ns::io_context & ioctx )
72 template<
typename Io_Context_Holder >
79 template<
typename... Io_Context_Holder_Ctor_Args >
83 std::size_t pool_size,
85 Io_Context_Holder_Ctor_Args && ...ioctx_holder_args )
108 "io_context_with_thread_pool is already started" };
asio_ns::io_context m_ioctx
auto & io_context() noexcept
Get access to io_context object.
external_io_context_for_thread_pool_t(asio_ns::io_context &ioctx)
Initializing constructor.
A class for holding a reference to external Asio's io_context.
ioctx_on_thread_pool_t(ioctx_on_thread_pool_t &&)=delete
A class for holding actual instance of Asio's io_context.
auto & io_context() noexcept
Get access to io_context object.
ioctx_on_thread_pool_t(std::size_t pool_size, Io_Context_Holder_Ctor_Args &&...ioctx_holder_args)
~ioctx_on_thread_pool_t()
asio_ns::io_context & m_ioctx
Io_Context_Holder m_ioctx_holder
ioctx_on_thread_pool_t(const ioctx_on_thread_pool_t &)=delete
bool started() const noexcept
asio_ns::io_context & io_context() noexcept
std::enable_if< std::is_same< Parameter_Container, query_string_params_t >::value||std::is_same< Parameter_Container, router::route_params_t >::value, optional_t< Value_Type > >::type opt_value(const Parameter_Container ¶ms, string_view_t key)
Gets the value of a parameter specified by key wrapped in optional_t<Value_Type> if parameter exists ...
std::vector< std::thread > m_pool
own_io_context_for_thread_pool_t()