source: tests/concurrent/waituntil/basic_else.cfa @ 85e49a6

ADTast-experimental
Last change on this file since 85e49a6 was a33a5e2, checked in by caparsons <caparson@…>, 14 months ago

added tests for the waituntil stmt

  • 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.