Changeset 200fcb3 for tests/concurrent/examples/datingService.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/examples/datingService.c
r3d99498 r200fcb3 8 8 // Created On : Mon Oct 30 12:56:20 2017 9 9 // Last Modified By : Peter A. Buhr 10 // Last Modified On : Sun May 27 09:05:18201811 // Update Count : 2 610 // Last Modified On : Tue Dec 11 21:55:34 2018 11 // Update Count : 28 12 12 // 13 13 … … 58 58 yield( random( 100 ) ); // don't all start at the same time 59 59 unsigned int partner = girl( TheExchange, id, ccode ); 60 sout | "Girl:" | id | "is dating Boy at" | partner | "with ccode" | ccode | endl;60 sout | "Girl:" | id | "is dating Boy at" | partner | "with ccode" | ccode; 61 61 girlck[id] = partner; 62 62 } // Girl main … … 69 69 70 70 thread Boy { 71 DatingService & TheExchange;71 DatingService & TheExchange; 72 72 unsigned int id, ccode; 73 73 }; // Boy … … 76 76 yield( random( 100 ) ); // don't all start at the same time 77 77 unsigned int partner = boy( TheExchange, id, ccode ); 78 sout | " Boy:" | id | "is dating Girl" | partner | "with ccode" | ccode | endl;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.