Boost C++ Libraries: Ticket #13064: Different behavior coroutine and coroutine2 https://svn.boost.org/trac10/ticket/13064 <p> 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. </p> <p> <strong>Test app log output with Coroutine</strong>: <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 /> </p> <p> <strong>Test app log output with Coroutine2</strong>: <br /> main: before coro call...<br /> TestRAII::ctor<br /> coro call 1<br /> main: after coro call...<br /> <strong>coro call 2</strong><br /> TestRAII::dtor<br /> main: after coro delete...<br /> </p> <p> Not sure but i think "coro call 2" must not be appeared. </p> <p> Build with GCC 7.1.0: </p> <p> g++ -c -pipe -g -std=gnu++1z -Wall -W -fPIC -I../../../../boost_1_64_0 -o main.o ./main.cpp </p> <p> g++ -o ./main main.o -L./ -lboost_coroutine -lboost_system -lboost_context -lboost_thread </p> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/13064 Trac 1.4.3 anonymous Tue, 13 Jun 2017 13:06:35 GMT attachment set https://svn.boost.org/trac10/ticket/13064 https://svn.boost.org/trac10/ticket/13064 <ul> <li><strong>attachment</strong> → <span class="trac-field-new">main_coro.cpp</span> </li> </ul> <p> coroutine version </p> Ticket anonymous Tue, 13 Jun 2017 13:06:57 GMT attachment set https://svn.boost.org/trac10/ticket/13064 https://svn.boost.org/trac10/ticket/13064 <ul> <li><strong>attachment</strong> → <span class="trac-field-new">main_coro2.cpp</span> </li> </ul> <p> coroutine2 version </p> Ticket olli Tue, 13 Jun 2017 15:41:34 GMT status changed; resolution set https://svn.boost.org/trac10/ticket/13064#comment:1 https://svn.boost.org/trac10/ticket/13064#comment:1 <ul> <li><strong>status</strong> <span class="trac-field-old">new</span> → <span class="trac-field-new">closed</span> </li> <li><strong>resolution</strong> → <span class="trac-field-new">fixed</span> </li> </ul> Ticket olli Tue, 13 Jun 2017 15:41:42 GMT <link>https://svn.boost.org/trac10/ticket/13064#comment:2 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/13064#comment:2</guid> <description> <p> ty </p> </description> <category>Ticket</category> </item> </channel> </rss>