Opened 6 years ago
Closed 6 years ago
#12221 closed Bugs (fixed)
coroutine<>::push_type function starts without pushing
Reported by: | Owned by: | olli | |
---|---|---|---|
Milestone: | To Be Determined | Component: | coroutine |
Version: | Boost 1.61.0 | Severity: | Problem |
Keywords: | Cc: |
Description
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.
Attachments (1)
Change History (3)
by , 6 years ago
Attachment: | coro2_unwind_bug.cpp added |
---|
comment:1 by , 6 years ago
comment:2 by , 6 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
thx, fixed