Changeset a109bb47
- Timestamp:
- Jan 14, 2019, 1:16:39 PM (6 years ago)
- Branches:
- ADT, aaron-thesis, arm-eh, ast-experimental, cleanup-dtors, enum, forall-pointer-decay, jacob/cs343-translation, jenkins-sandbox, master, new-ast, new-ast-unique-expr, no_list, persistent-indexer, pthread-emulation, qualifiedEnum
- Children:
- 07ec1a2
- Parents:
- 7bd3bf2
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
tests/concurrent/examples/datingService.cfa
r7bd3bf2 ra109bb47 33 33 signal_block( Boys[ccode] ); // restart boy to set phone number 34 34 } // if 35 sout | "Girl:" | PhoneNo | "is dating Boy at" | BoyPhoneNo | "with ccode" | ccode; 35 36 return BoyPhoneNo; 36 37 } // DatingService girl … … 44 45 signal_block( Girls[ccode] ); // restart girl to set phone number 45 46 } // if 47 sout | " Boy:" | PhoneNo | "is dating Girl" | GirlPhoneNo | "with ccode" | ccode; 46 48 return GirlPhoneNo; 47 49 } // DatingService boy … … 58 60 yield( random( 100 ) ); // don't all start at the same time 59 61 unsigned int partner = girl( TheExchange, id, ccode ); 60 sout | "Girl:" | id | "is dating Boy at" | partner | "with ccode" | ccode;61 62 girlck[id] = partner; 62 63 } // Girl main … … 76 77 yield( random( 100 ) ); // don't all start at the same time 77 78 unsigned int partner = boy( TheExchange, id, ccode ); 78 sout | " Boy:" | id | "is dating Girl" | partner | "with ccode" | ccode;79 79 boyck[id] = partner; 80 80 } // Boy main
Note: See TracChangeset
for help on using the changeset viewer.