RESTinio
Loading...
Searching...
No Matches
executor_wrapper.hpp
Go to the documentation of this file.
1/*
2 restinio
3*/
4
5/*!
6 Execution mixin.
7*/
8
9#pragma once
10
11
12namespace restinio
13{
14
15namespace impl
16{
17
18//
19// executor_wrapper_t
20//
21
22//! Wrapper for an executor (strand) used by connections.
23template < typename Executor >
25{
26 public:
27 template < typename Init_Executor >
28 executor_wrapper_t( Init_Executor && init_executor )
30 {}
31
32 virtual ~executor_wrapper_t() = default;
33
34 //! An executor for callbacks on async operations.
35 Executor & get_executor() noexcept { return m_executor; }
36
37 private:
38 //! Sync object for connection events.
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)