mirror of
https://github.com/boostorg/coroutine.git
synced 2026-07-21 13:13:33 +00:00
Fix stack unwinding example
This commit is contained in:
+1
-2
@@ -276,7 +276,7 @@ After unwinding, a __coro__ is complete.
|
||||
boost::coroutines::asymmetric_coroutine<void>::push_type sink(
|
||||
[&](boost::coroutines::asymmetric_coroutine<void>::pull_type& source){
|
||||
X x;
|
||||
for(int=0;;++i){
|
||||
for(int i=0;;++i){
|
||||
std::cout<<"fn(): "<<i<<std::endl;
|
||||
// transfer execution control back to main()
|
||||
source();
|
||||
@@ -299,7 +299,6 @@ After unwinding, a __coro__ is complete.
|
||||
fn(): 2
|
||||
fn(): 3
|
||||
fn(): 4
|
||||
fn(): 5
|
||||
sink is complete: false
|
||||
~X()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user