1 // Copyright (C) 2014 Ian Forbed
2 // Copyright (C) 2014 Vicente J. Botet Escriba
4 // Distributed under the Boost Software License, Version 1.0. (See accompanying
5 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
8 #ifndef BOOST_THREAD_EXECUTORS_SCHEDULING_ADAPTOR_HPP
9 #define BOOST_THREAD_EXECUTORS_SCHEDULING_ADAPTOR_HPP
11 #include <boost/thread/detail/config.hpp>
12 #if defined BOOST_THREAD_PROVIDES_FUTURE_CONTINUATION && defined BOOST_THREAD_PROVIDES_EXECUTORS && defined BOOST_THREAD_USES_MOVE
13 #include <boost/thread/executors/detail/scheduled_executor_base.hpp>
15 #if defined(BOOST_MSVC)
16 # pragma warning(push)
17 # pragma warning(disable: 4355) // 'this' : used in base member initializer list
25 template <typename Executor>
26 class scheduling_adaptor : public detail::scheduled_executor_base<>
33 scheduling_adaptor(Executor& ex)
36 _scheduler(&super::loop, this) {}
41 _scheduler.interrupt();
45 Executor& underlying_executor()
51 typedef detail::scheduled_executor_base<> super;
56 using executors::scheduling_adaptor;
60 #if defined(BOOST_MSVC)