Subject: [Boost-bugs] [Boost C++ Libraries] #12221: coroutine<>::push_type function starts without pushing
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2016-05-22 09:15:08
#12221: coroutine<>::push_type function starts without pushing
------------------------------+-----------------------
Reporter: valentin.milea@⦠| Owner: olli
Type: Bugs | Status: new
Milestone: To Be Determined | Component: coroutine
Version: Boost 1.61.0 | Severity: Problem
Keywords: |
------------------------------+-----------------------
According to coroutine2 docs: "In contrast to coroutine<>::pull_type,
instantiating an coroutine<>::push_type does not pass the control of
execution to coroutine-function - instead the first call of
coroutine<>::push_type::operator() synthesizes a complementary
coroutine<>::pull_type and passes it as reference to coroutine-function. "
So the function of a push-coroutine should never be entered unless at
least one value is pushed. But the coroutine always tries to unwind in
destructor and mistakenly resumes the function. Example attached.
This bug is present in coroutine2. Original coroutine library is
unaffected.
-- Ticket URL: <https://svn.boost.org/trac/boost/ticket/12221> 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:20 UTC