RESTinio
executor_wrapper.hpp
Go to the documentation of this file.
1/*
2 restinio
3*/
4
9#pragma once
10
11
12namespace restinio
13{
14
15namespace impl
16{
17
18//
19// executor_wrapper_t
20//
21
23template < typename Executor >
25{
26 public:
27 template < typename Init_Executor >
28 executor_wrapper_t( Init_Executor && init_executor )
29 : m_executor{ std::forward< Init_Executor >( init_executor ) }
30 {}
31
32 virtual ~executor_wrapper_t() = default;
33
35 Executor & get_executor() noexcept { return m_executor; }
36
37 private:
39 Executor m_executor;
40};
41
42
43} /* namespace impl */
44
45} /* namespace restinio */
Wrapper for an executor (strand) used by connections.
Executor & get_executor() noexcept
An executor for callbacks on async operations.
virtual ~executor_wrapper_t()=default
Executor m_executor
Sync object for connection events.
executor_wrapper_t(Init_Executor &&init_executor)
STL namespace.