Changeset 8f936bf for doc/papers/concurrency/c++-cor/C++Cor-ts.cpp
- Timestamp:
- Mar 19, 2019, 4:30:33 PM (5 years ago)
- Branches:
- ADT, arm-eh, ast-experimental, cleanup-dtors, enum, forall-pointer-decay, jacob/cs343-translation, jenkins-sandbox, master, new-ast, new-ast-unique-expr, pthread-emulation, qualifiedEnum
- Children:
- 79b018f3
- Parents:
- be3416d
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
doc/papers/concurrency/c++-cor/C++Cor-ts.cpp
rbe3416d r8f936bf 18 18 //================================================== 19 19 20 21 20 co_yield i; 22 21 … … 28 27 29 28 co_await __promise.yield_value(i); 29 30 //================================================== 31 32 ... coroutine() { 33 __coroutine_context* __context = new __coroutine_context{}; 34 __return = __context->_promise.get_return_object(); 35 co_await __context->_promise.initial_suspend(); 36 37 ... 38 39 __final_suspend_label: 40 co_await __context->promise.final_suspend(); 41 delete __context; 42 }
Note: See TracChangeset
for help on using the changeset viewer.