#include <boost/asio/detail/config.hpp>
#include <boost/coroutine/all.hpp>
+#include <boost/asio/any_io_executor.hpp>
#include <boost/asio/bind_executor.hpp>
#include <boost/asio/detail/memory.hpp>
#include <boost/asio/detail/type_traits.hpp>
#include <boost/asio/detail/wrapped_handler.hpp>
-#include <boost/asio/executor.hpp>
#include <boost/asio/io_context.hpp>
#include <boost/asio/is_executor.hpp>
#include <boost/asio/strand.hpp>
typedef basic_yield_context<unspecified> yield_context;
#else // defined(GENERATING_DOCUMENTATION)
typedef basic_yield_context<
- executor_binder<void(*)(), executor> > yield_context;
+ executor_binder<void(*)(), any_io_executor> > yield_context;
#endif // defined(GENERATING_DOCUMENTATION)
/**
BOOST_ASIO_MOVE_ARG(Function) function,
const boost::coroutines::attributes& attributes
= boost::coroutines::attributes(),
- typename enable_if<!is_executor<typename decay<Handler>::type>::value &&
+ typename enable_if<
+ !is_executor<typename decay<Handler>::type>::value &&
+ !execution::is_executor<typename decay<Handler>::type>::value &&
!is_convertible<Handler&, execution_context&>::value>::type* = 0);
/// Start a new stackful coroutine, inheriting the execution context of another.
BOOST_ASIO_MOVE_ARG(Function) function,
const boost::coroutines::attributes& attributes
= boost::coroutines::attributes(),
- typename enable_if<is_executor<Executor>::value>::type* = 0);
+ typename enable_if<
+ is_executor<Executor>::value || execution::is_executor<Executor>::value
+ >::type* = 0);
/// Start a new stackful coroutine that executes on a given strand.
/**
const boost::coroutines::attributes& attributes
= boost::coroutines::attributes());
+#if !defined(BOOST_ASIO_NO_TS_EXECUTORS)
+
/// Start a new stackful coroutine that executes in the context of a strand.
/**
* This function is used to launch a new coroutine.
const boost::coroutines::attributes& attributes
= boost::coroutines::attributes());
+#endif // !defined(BOOST_ASIO_NO_TS_EXECUTORS)
+
/// Start a new stackful coroutine that executes on a given execution context.
/**
* This function is used to launch a new coroutine.