Changeset 6a6e205 for tests/concurrency/actors
- Timestamp:
- Jan 13, 2025, 1:32:32 PM (7 days ago)
- Branches:
- master
- Children:
- c086c6e
- Parents:
- 267b543
- Location:
- tests/concurrency/actors
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
tests/concurrency/actors/dynamic.cfa
r267b543 r6a6e205 19 19 void ?{}( derived_msg & this ) { ((derived_msg &)this){ 0 }; } 20 20 21 allocation receive( derived_actor & receiver, derived_msg & msg ) {21 allocation receive( derived_actor &, derived_msg & msg ) { 22 22 if ( msg.cnt >= Times ) { 23 23 sout | "Done"; -
tests/concurrency/actors/inherit.cfa
r267b543 r6a6e205 21 21 } 22 22 23 allocation receive( Server & receiver, D_msg & msg) { return handle(); }24 allocation receive( Server & receiver, D_msg2 & msg) { return handle(); }25 allocation receive( Server2 & receiver, D_msg & msg) { return Delete; }26 allocation receive( Server2 & receiver, D_msg2 & msg) { return Delete; }23 allocation receive( Server &, D_msg & ) { return handle(); } 24 allocation receive( Server &, D_msg2 & ) { return handle(); } 25 allocation receive( Server2 &, D_msg & ) { return Delete; } 26 allocation receive( Server2 &, D_msg2 & ) { return Delete; } 27 27 28 28 int main() { -
tests/concurrency/actors/inline.cfa
r267b543 r6a6e205 50 50 d_msg2 dm{ 29079 }; 51 51 set_allocation( dm, Nodelete ); 52 msg_wrapper * mw = &dm; 53 message * mg = &dm; 54 virtual_dtor * v = &dm; 52 msg_wrapper * mw = &dm; (void) mw; 53 message * mg = &dm; (void) mg; 54 virtual_dtor * v = &dm; (void) v; 55 55 da | dm; 56 56 actor_stop(); // waits until actors finish -
tests/concurrency/actors/pingpong.cfa
r267b543 r6a6e205 20 20 size_t times = 100000; 21 21 22 allocation receive( ping & receiver, p_msg & msg ) {22 allocation receive( ping &, p_msg & msg ) { 23 23 msg.count++; 24 24 if ( msg.count > times ) return Finished; … … 30 30 } 31 31 32 allocation receive( pong & receiver, p_msg & msg ) {32 allocation receive( pong &, p_msg & msg ) { 33 33 msg.count++; 34 34 if ( msg.count > times ) return Finished; … … 42 42 size_t Processors = 2; 43 43 44 int main( int argc, char * argv[]) {44 int main() { 45 45 sout | "start"; 46 46 -
tests/concurrency/actors/types.cfa
r267b543 r6a6e205 36 36 }; 37 37 38 allocation receive( derived_actor2 & receiver, d_msg & msg ) {38 allocation receive( derived_actor2 &, d_msg & msg ) { 39 39 mutex(sout) sout | msg.num; 40 40 return Finished; … … 48 48 }; 49 49 50 allocation receive( derived_actor3 & receiver, d_msg & msg ) {50 allocation receive( derived_actor3 &, d_msg & msg ) { 51 51 mutex(sout) sout | msg.num; 52 52 if ( msg.num == -1 ) return Nodelete; … … 54 54 } 55 55 56 allocation receive( derived_actor3 & receiver, d_msg2 & msg ) {56 allocation receive( derived_actor3 &, d_msg2 & msg ) { 57 57 mutex(sout) sout | msg.num; 58 58 return Finished; … … 61 61 size_t Processors = 3; 62 62 63 int main( int argc, char * argv[]) {63 int main() { 64 64 sout | "start"; 65 65
Note: See TracChangeset
for help on using the changeset viewer.