Subject: [Boost-bugs] [Boost C++ Libraries] #13064: Different behavior coroutine and coroutine2
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2017-06-13 13:05:02
#13064: Different behavior coroutine and coroutine2
----------------------------------+-----------------------
Reporter: big.black.fox@⦠| Owner: olli
Type: Bugs | Status: new
Milestone: To Be Determined | Component: coroutine
Version: Boost 1.64.0 | Severity: Problem
Keywords: coroutine coroutine2 |
----------------------------------+-----------------------
I noticed different behavior in Coroutine and Coroutine2. There is a
source file in attachment. Code creates void asymmetric coroutine and
calls it once. Coroutine returns execution to an invoker, then coroutine
destructor calls. At this moment coroutine unwind stack. After I switch to
Coroutine2 behavior changed: after coroutine destructor calls it returns
execution to coroutine ("coro call 2" in the log) and then unwind stack.
'''Test app log output with Coroutine''':
[[BR]]
main: before coro call...[[BR]]
TestRAII::ctor[[BR]]
coro call 1[[BR]]
main: after coro call...[[BR]]
TestRAII::dtor[[BR]]
main: after coro delete...[[BR]]
'''Test app log output with Coroutine2''':
[[BR]]
main: before coro call...[[BR]]
TestRAII::ctor[[BR]]
coro call 1[[BR]]
main: after coro call...[[BR]]
'''coro call 2'''[[BR]]
TestRAII::dtor[[BR]]
main: after coro delete...[[BR]]
Not sure but i think "coro call 2" must not be appeared.
Build with GCC 7.1.0:
g++ -c -pipe -g -std=gnu++1z -Wall -W -fPIC -I../../../../boost_1_64_0 -o
main.o ./main.cpp
g++ -o ./main main.o -L./ -lboost_coroutine -lboost_system -lboost_context
-lboost_thread
-- Ticket URL: <https://svn.boost.org/trac10/boost/ticket/13064> 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-06-13 13:09:18 UTC