Changeset 200fcb3 for tests/concurrent/waitfor/else.c
- Timestamp:
- Dec 12, 2018, 9:16:12 AM (6 years ago)
- Branches:
- ADT, aaron-thesis, arm-eh, ast-experimental, cleanup-dtors, deferred_resn, enum, forall-pointer-decay, jacob/cs343-translation, jenkins-sandbox, master, new-ast, new-ast-unique-expr, no_list, persistent-indexer, pthread-emulation, qualifiedEnum
- Children:
- 5ebb1368
- Parents:
- 3d99498
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
tests/concurrent/waitfor/else.c
r3d99498 r200fcb3 12 12 void test( M & mutex m ) { 13 13 int i = 0; 14 sout | "Starting" | endl;14 sout | "Starting"; 15 15 16 16 when( false ) waitfor( notcalled, m ); 17 17 18 sout | "Step" | i++ | endl;18 sout | "Step" | i++; 19 19 20 20 waitfor( notcalled, m ); or else { 21 sout | "else called" | endl;21 sout | "else called"; 22 22 } 23 23 24 sout | "Step" | i++ | endl;24 sout | "Step" | i++; 25 25 26 26 when( true ) waitfor( notcalled, m ); or when( true ) else { 27 sout | "else called" | endl;27 sout | "else called"; 28 28 } 29 29 30 sout | "Step" | i++ | endl;30 sout | "Step" | i++; 31 31 32 32 when( false ) waitfor( notcalled, m ); or when( true ) else { 33 sout | "else called" | endl;33 sout | "else called"; 34 34 } 35 35 36 sout | "Step" | i++ | endl;36 sout | "Step" | i++; 37 37 38 38 when( false ) waitfor( notcalled, m ); or when( false ) else { 39 sout | "else called" | endl;39 sout | "else called"; 40 40 } 41 41 42 sout | "Done" | endl;42 sout | "Done"; 43 43 } 44 44
Note: See TracChangeset
for help on using the changeset viewer.