executor_wrapper.hpp
Go to the documentation of this file.
/*
restinio
*/
#pragma once
namespace restinio
{
namespace impl
{
//
// executor_wrapper_t
//
template < typename Executor >
class executor_wrapper_t
{
public:
template < typename Init_Executor >
executor_wrapper_t( Init_Executor && init_executor )
: m_executor{ std::forward< Init_Executor >( init_executor ) }
{}
virtual ~executor_wrapper_t() = default;
Executor & get_executor() noexcept { return m_executor; }
private:
Executor m_executor;
};
} /* namespace impl */
} /* namespace restinio */
restinio::impl::executor_wrapper_t
Wrapper for an executor (strand) used by connections.
Definition: executor_wrapper.hpp:25
restinio::impl::executor_wrapper_t::get_executor
Executor & get_executor() noexcept
An executor for callbacks on async operations.
Definition: executor_wrapper.hpp:35
restinio::impl::executor_wrapper_t::~executor_wrapper_t
virtual ~executor_wrapper_t()=default
restinio::impl::executor_wrapper_t::m_executor
Executor m_executor
Sync object for connection events.
Definition: executor_wrapper.hpp:39
restinio::impl::executor_wrapper_t::executor_wrapper_t
executor_wrapper_t(Init_Executor &&init_executor)
Definition: executor_wrapper.hpp:28
restinio
Definition: asio_include.hpp:21
std
STL namespace.