ADTast-experimentalenumpthread-emulationqualifiedEnum
Last change
on this file since 891f707 was
dfa4360,
checked in by Thierry Delisle <tdelisle@…>, 5 years ago
|
Added several tests for generators
|
-
Property mode set to
100644
|
File size:
573 bytes
|
Rev | Line | |
---|
[dfa4360] | 1 | // |
---|
| 2 | // Cforall Version 1.0.0 Copyright (C) 2016 University of Waterloo |
---|
| 3 | // |
---|
| 4 | // The contents of this file are covered under the licence agreement in the |
---|
| 5 | // file "LICENCE" distributed with Cforall. |
---|
| 6 | // |
---|
| 7 | // suspend.cfa -- |
---|
| 8 | // |
---|
| 9 | // Author : Thierry Delisle |
---|
| 10 | // Created On : Thu Mar 5 16:03:16 2020 |
---|
| 11 | // Last Modified By : |
---|
| 12 | // Last Modified On : |
---|
| 13 | // Update Count : |
---|
| 14 | // |
---|
| 15 | |
---|
| 16 | #include <coroutine.hfa> |
---|
| 17 | |
---|
| 18 | generator A {}; |
---|
| 19 | |
---|
| 20 | void main(A & a) { |
---|
| 21 | suspend { |
---|
| 22 | suspend; |
---|
| 23 | } |
---|
| 24 | |
---|
| 25 | suspend{ |
---|
| 26 | int foo() { return 3; } |
---|
| 27 | } |
---|
| 28 | } |
---|
| 29 | |
---|
| 30 | coroutine B {}; |
---|
| 31 | |
---|
| 32 | void main(B & b) { |
---|
| 33 | suspend generator; |
---|
| 34 | |
---|
| 35 | suspend {}; |
---|
| 36 | } |
---|
Note: See
TracBrowser
for help on using the repository browser.