11 #ifndef ASIO_SPAWN_HPP 12 #define ASIO_SPAWN_HPP 14 #if defined(_MSC_VER) && (_MSC_VER >= 1200) 16 #endif // defined(_MSC_VER) && (_MSC_VER >= 1200) 19 #include <boost/coroutine/all.hpp> 47 template <
typename Handler>
58 #if defined(GENERATING_DOCUMENTATION) 60 #elif defined(BOOST_COROUTINES_UNIDIRECT) || defined(BOOST_COROUTINES_V2) 61 typedef boost::coroutines::push_coroutine<void>
callee_type;
73 #if defined(GENERATING_DOCUMENTATION) 75 #elif defined(BOOST_COROUTINES_UNIDIRECT) || defined(BOOST_COROUTINES_V2) 76 typedef boost::coroutines::pull_coroutine<void>
caller_type;
78 typedef boost::coroutines::coroutine<void()>::caller_type
caller_type;
88 const detail::weak_ptr<callee_type>& coro,
89 caller_type& ca, Handler& handler)
123 #if defined(GENERATING_DOCUMENTATION) 125 #endif // defined(GENERATING_DOCUMENTATION) 126 detail::weak_ptr<callee_type>
coro_;
132 #if defined(GENERATING_DOCUMENTATION) 135 #else // defined(GENERATING_DOCUMENTATION) 140 #endif // defined(GENERATING_DOCUMENTATION) 193 template <
typename Handler,
typename Function>
196 const boost::coroutines::attributes& attributes
197 = boost::coroutines::attributes());
214 template <
typename Handler,
typename Function>
217 const boost::coroutines::attributes& attributes
218 = boost::coroutines::attributes());
233 template <
typename Function>
236 const boost::coroutines::attributes& attributes
237 = boost::coroutines::attributes());
251 template <
typename Function>
254 const boost::coroutines::attributes& attributes
255 = boost::coroutines::attributes());
265 #endif // ASIO_SPAWN_HPP
Provides core I/O functionality.
Provides serialised handler execution.
asio::io_service::strand strand
basic_yield_context(const detail::weak_ptr< callee_type > &coro, caller_type &ca, Handler &handler)
Construct a yield context to represent the specified coroutine.
boost::coroutines::coroutine< void()> callee_type
The coroutine callee type, used by the implementation.
Context object the represents the currently executing coroutine.
asio::basic_streambuf< Allocator > CompletionCondition ASIO_MOVE_ARG(ReadHandler) handler)
Class to represent an error code value.
void spawn(ASIO_MOVE_ARG(Handler) handler, ASIO_MOVE_ARG(Function) function, const boost::coroutines::attributes &attributes)
detail::weak_ptr< callee_type > coro_
basic_yield_context operator[](asio::error_code &ec) const
Return a yield context that sets the specified error_code.
basic_yield_context< detail::wrapped_handler< io_service::strand, void(*)(), detail::is_continuation_if_running > > yield_context
boost::coroutines::coroutine< void()>::caller_type caller_type
The coroutine caller type, used by the implementation.