Changeset 48ec19a for tests/exceptions/cancel/coroutine.cfa
- Timestamp:
- Jun 26, 2023, 10:51:47 AM (2 years ago)
- Branches:
- master
- Children:
- 917e1fd
- Parents:
- adc73a5 (diff), 1fbf481 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the(diff)
links above to see all the changes relative to each parent. - File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
tests/exceptions/cancel/coroutine.cfa
radc73a5 r48ec19a 1 1 // Try cancelling a coroutine. 2 2 3 #include <fstream.hfa> 3 4 #include <coroutine.hfa> 4 5 … … 13 14 14 15 void main(WillCancel & wc) { 15 printf("1");16 sout | '1'; 16 17 cancel_stack((internal_error){&internal_vt}); 17 printf("!");18 sout | '!'; 18 19 } 19 20 20 21 int main(int argc, char * argv[]) { 22 sout | nlOff; 21 23 WillCancel cancel; 22 24 try { 23 printf("0");25 sout | '0'; 24 26 resume(cancel); 25 printf("4");27 sout | '4'; 26 28 } catchResume (CoroutineCancelled(WillCancel) * error) { 27 printf("2");29 sout | '2'; 28 30 if ((virtual internal_error *)error->the_exception) { 29 printf("3");31 sout | '3'; 30 32 } 31 33 } 32 printf("5\n");34 sout | '5' | nl; 33 35 }
Note:
See TracChangeset
for help on using the changeset viewer.