Subject: [Boost-bugs] [Boost C++ Libraries] #9731: io_service::~io_service does not desrtoy asio::spawn-ed coroutine (MSVC only)
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2014-03-03 11:12:46
#9731: io_service::~io_service does not desrtoy asio::spawn-ed coroutine (MSVC
only)
------------------------------+----------------------------
Reporter: anonymous | Owner: chris_kohlhoff
Type: Bugs | Status: new
Milestone: To Be Determined | Component: asio
Version: Boost 1.55.0 | Severity: Problem
Keywords: |
------------------------------+----------------------------
Hello!
There is a bug in MSVC - it doesn't generate implicit move constructor for
boost::asio::detail::coro_handler and spawn_helper (see
asio/impl/spawn.hpp). Because of that, pull part of coroutine gets
strongly referenced by coroutine itself and could not be destroyed during
~io_service execution.
Please consider an example in attachment. It should print:
Entering coroutine \\
Exiting coroutine
When compiled with MSVC, it doesn't print 2nd line.
Adding move construtors to coro_handler (in both specializations) and to
spawn_helper will fix this issue.
P.S. this issue depends on https://svn.boost.org/trac/boost/ticket/9442
-- Ticket URL: <https://svn.boost.org/trac/boost/ticket/9731> 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:15 UTC