#12221 closed Bugs (fixed)

coroutine<>::push_type function starts without pushing

Reported by: valentin.milea@… Owned by: olli
Milestone: To Be Determined Component: coroutine
Version: Boost 1.61.0 Severity: Problem
Keywords: Cc:


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)

coro2_unwind_bug.cpp (433 bytes) - added by valentin.milea@… 21 months ago.

Download all attachments as: .zip

Change History (3)

Changed 21 months ago by valentin.milea@…

Attachment: coro2_unwind_bug.cpp added

comment:1 Changed 21 months ago by olli

thx, fixed

comment:2 Changed 21 months ago by olli

Resolution: fixed
Status: newclosed

Modify Ticket

Change Properties
Set your email in Preferences
as closed The owner will remain olli.
The resolution will be deleted.

Add Comment

E-mail address and name can be saved in the Preferences.

Note: See TracTickets for help on using tickets.