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

Subject: [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:11:50


#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
 Keywords: |
------------------------------+----------------------------
 Following code works as expected (i.e. prints 'works'). However, it prints
 nothing if you uncomment lines that enable (or try to enable) use of
 coroutines v2 in spawn.

 {{{
 #include <iostream>
 #include <functional>
 //#define BOOST_COROUTINES_UNIDIRECT
 //#define BOOST_COROUTINES_V2
 #include <boost/asio.hpp>
 #include <boost/asio/spawn.hpp>

 void foo(boost::asio::yield_context ctx)
 {
     std::cout << "works!" << std::endl;
 }

 int main()
 {
     boost::asio::io_service srv;

     boost::asio::spawn(srv, std::bind(foo, std::placeholders::_1));
     srv.run();
 }
 }}}

 I am not sure if asio is intentionally not using new coroutines interface
 by default, but this seems pretty important thing going forward.

-- 
Ticket URL: <https://svn.boost.org/trac/boost/ticket/9442>
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