#13064 closed Bugs (fixed)
Different behavior coroutine and coroutine2
Reported by: | Owned by: | olli | |
---|---|---|---|
Milestone: | To Be Determined | Component: | coroutine |
Version: | Boost 1.64.0 | Severity: | Problem |
Keywords: | coroutine coroutine2 | Cc: |
Description
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:
main: before coro call...
TestRAII::ctor
coro call 1
main: after coro call...
TestRAII::dtor
main: after coro delete...
Test app log output with Coroutine2:
main: before coro call...
TestRAII::ctor
coro call 1
main: after coro call...
coro call 2
TestRAII::dtor
main: after coro delete...
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
Attachments (2)
Change History (4)
by , 5 years ago
Attachment: | main_coro.cpp added |
---|
comment:1 by , 5 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
coroutine version