source: tests/concurrency/waituntil/basic_else.cfa @ 53f6a11

ast-experimental
Last change on this file since 53f6a11 was c26bea2a, checked in by Peter A. Buhr <pabuhr@…>, 19 months ago

first attempt at renaming directory tests/concurrent to tests/concurrency to harmonize with other concurrency directory names

  • Property mode set to 100644
File size: 515 bytes
Line 
1#include <select.hfa>
2#include <future.hfa>
3
4future(int) A, B, C;
5
6int main() {
7    waituntil( A ) { printf("A1\n"); } or else { printf("else1\n"); }
8    fulfil( A, 1 );
9    waituntil( A ) { printf("A2\n"); } or else { printf("else2\n"); }
10    reset( A );
11    waituntil( A ) { printf("A3\n"); } or when(true) else { printf("else3\n"); }
12    fulfil( A, 1 );
13    waituntil( A ) { printf("A4\n"); } or when(false) else { printf("else4\n"); }
14    reset( A );
15    fulfil( A, 1 );
16    waituntil( A ) { printf("A5\n"); }
17}
Note: See TracBrowser for help on using the repository browser.