source:
CIVL/examples/languageFeatures/atomWaitBad.cvl@
90dd7d7
| Last change on this file since 90dd7d7 was 9cd6168, checked in by , 12 years ago | |
|---|---|
|
|
| File size: 220 bytes | |
| Rev | Line | |
|---|---|---|
| [5a81196] | 1 | #include <civlc.h> |
| 2 | void foo(){ | |
| 3 | void koo(){ | |
| 4 | int o = 0; | |
| 5 | o++; | |
| 6 | } | |
| 7 | ||
| 8 | $proc p = $spawn koo(); | |
| [9cd6168] | 9 | // undesired wait blocked state in $atom block, an exception will be thrown |
| [5a81196] | 10 | $wait p; |
| 11 | } | |
| 12 | ||
| 13 | void main(){ | |
| 14 | ||
| [9cd6168] | 15 | $atom{ |
| [5a81196] | 16 | foo(); |
| 17 | } | |
| 18 | } |
Note:
See TracBrowser
for help on using the repository browser.
