Re: [Boost-bugs] [Boost C++ Libraries] #9442: boost::asio::spawn does nothing when coroutines v2 are enabled

Subject: Re: [Boost-bugs] [Boost C++ Libraries] #9442: boost::asio::spawn does nothing when coroutines v2 are enabled
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2013-11-28 02:27:10


#9442: boost::asio::spawn does nothing when coroutines v2 are enabled
-------------------------------+----------------------------
  Reporter: drigh@… | Owner: chris_kohlhoff
      Type: Bugs | Status: new
 Milestone: To Be Determined | Component: asio
   Version: Boost 1.55.0 | Severity: Problem
Resolution: | Keywords:
-------------------------------+----------------------------

Comment (by drigh@…):

 this is my fix on top of boost 1.55.0:

 {{{
 diff --git a/boost/asio/spawn.hpp b/boost/asio/spawn.hpp
 index 0d7ee77..232e2e0 100644
 --- a/boost/asio/spawn.hpp
 +++ b/boost/asio/spawn.hpp
 @@ -54,12 +54,12 @@ public:
     * When using Boost.Coroutine v1, this type is:
     * @code typename coroutine<void()> @endcode
     * When using Boost.Coroutine v2 (unidirectional coroutines), this type
 is:
 - * @code push_coroutine<void> @endcode
 + * @code pull_coroutine<void> @endcode
     */
  #if defined(GENERATING_DOCUMENTATION)
    typedef implementation_defined callee_type;
  #elif defined(BOOST_COROUTINES_UNIDRECT) || defined(BOOST_COROUTINES_V2)
 - typedef boost::coroutines::push_coroutine<void> callee_type;
 + typedef boost::coroutines::pull_coroutine<void> callee_type;
  #else
    typedef boost::coroutines::coroutine<void()> callee_type;
  #endif
 @@ -69,12 +69,12 @@ public:
     * When using Boost.Coroutine v1, this type is:
     * @code typename coroutine<void()>::caller_type @endcode
     * When using Boost.Coroutine v2 (unidirectional coroutines), this type
 is:
 - * @code pull_coroutine<void> @endcode
 + * @code push_coroutine<void> @endcode
     */
  #if defined(GENERATING_DOCUMENTATION)
    typedef implementation_defined caller_type;
  #elif defined(BOOST_COROUTINES_UNIDRECT) || defined(BOOST_COROUTINES_V2)
 - typedef boost::coroutines::pull_coroutine<void> caller_type;
 + typedef boost::coroutines::push_coroutine<void> caller_type;
  #else
    typedef boost::coroutines::coroutine<void()>::caller_type caller_type;
  #endif
 }}}

 not entirely sure it'll work, but it definitely seems to

-- 
Ticket URL: <https://svn.boost.org/trac/boost/ticket/9442#comment:1>
Boost C++ Libraries <http://www.boost.org/>
Boost provides free peer-reviewed portable C++ source libraries.

This archive was generated by hypermail 2.1.7 : 2017-02-16 18:50:14 UTC