- Timestamp:
- Jun 17, 2023, 9:31:06 AM (18 months ago)
- Branches:
- master
- Children:
- 0e0f25d5
- Parents:
- 05956d21
- Location:
- tests/concurrency/actors
- Files:
-
- 9 edited
Legend:
- Unmodified
- Added
- Removed
-
tests/concurrency/actors/dynamic.cfa
r05956d21 r77fd9fe2 28 28 derived_actor * d_actor = alloc(); 29 29 (*d_actor){}; 30 *d_actor <<*d_msg;30 *d_actor | *d_msg; 31 31 return Delete; 32 32 } … … 58 58 derived_actor * d_actor = alloc(); 59 59 (*d_actor){}; 60 *d_actor <<*d_msg;60 *d_actor | *d_msg; 61 61 62 62 printf("stopping\n"); -
tests/concurrency/actors/executor.cfa
r05956d21 r77fd9fe2 28 28 if ( recs % Batch == 0 ) { 29 29 for ( i; Batch ) { 30 gstart[sends % Set] <<shared_msg;30 gstart[sends % Set] | shared_msg; 31 31 sends += 1; 32 32 } … … 94 94 95 95 for ( i; Actors ) { 96 actors[i] <<shared_msg;96 actors[i] | shared_msg; 97 97 } // for 98 98 -
tests/concurrency/actors/inherit.cfa
r05956d21 r77fd9fe2 38 38 Server2 * s2 = alloc(); 39 39 (*s2){}; 40 *s <<*dm;41 *s2 <<*dm2;40 *s | *dm; 41 *s2 | *dm2; 42 42 stop_actor_system(); 43 43 } … … 49 49 D_msg2 * dm2 = alloc(); 50 50 (*dm2){}; 51 s[0] <<*dm;52 s[1] <<*dm2;51 s[0] | *dm; 52 s[1] | *dm2; 53 53 stop_actor_system(); 54 54 } -
tests/concurrency/actors/inline.cfa
r05956d21 r77fd9fe2 41 41 d_msg * dm = alloc(); 42 42 (*dm){ 42, 2423 }; 43 da <<*dm;43 da | *dm; 44 44 stop_actor_system(); // waits until actors finish 45 45 } … … 52 52 message * mg = &dm; 53 53 virtual_dtor * v = &dm; 54 da <<dm;54 da | dm; 55 55 stop_actor_system(); // waits until actors finish 56 56 } -
tests/concurrency/actors/matrix.cfa
r05956d21 r77fd9fe2 105 105 106 106 for ( unsigned int r = 0; r < xr; r += 1 ) { 107 actors[r] <<messages[r];107 actors[r] | messages[r]; 108 108 } // for 109 109 -
tests/concurrency/actors/pingpong.cfa
r05956d21 r77fd9fe2 25 25 allocation retval = Nodelete; 26 26 if ( msg.count == times ) retval = Finished; 27 *po <<msg;27 *po | msg; 28 28 return retval; 29 29 } … … 35 35 allocation retval = Nodelete; 36 36 if ( msg.count == times ) retval = Finished; 37 *pi <<msg;37 *pi | msg; 38 38 return retval; 39 39 } … … 53 53 pi = &pi_actor; 54 54 p_msg m; 55 pi_actor <<m;55 pi_actor | m; 56 56 stop_actor_system(); 57 57 -
tests/concurrency/actors/poison.cfa
r05956d21 r77fd9fe2 18 18 Server s[10]; 19 19 for ( i; 10 ) { 20 s[i] <<finished_msg;20 s[i] | finished_msg; 21 21 } 22 22 stop_actor_system(); … … 29 29 Server * s = alloc(); 30 30 (*s){}; 31 (*s) <<delete_msg;31 (*s) | delete_msg; 32 32 } 33 33 stop_actor_system(); … … 39 39 Server s[10]; 40 40 for ( i; 10 ) 41 s[i] <<destroy_msg;41 s[i] | destroy_msg; 42 42 stop_actor_system(); 43 43 for ( i; 10 ) -
tests/concurrency/actors/static.cfa
r05956d21 r77fd9fe2 25 25 } 26 26 msg.cnt++; 27 receiver <<msg;27 receiver | msg; 28 28 return Nodelete; 29 29 } … … 55 55 derived_actor actor; 56 56 57 actor <<msg;57 actor | msg; 58 58 59 59 printf("stopping\n"); -
tests/concurrency/actors/types.cfa
r05956d21 r77fd9fe2 72 72 b.num = 1; 73 73 c.num = 2; 74 a << b <<c;74 a | b | c; 75 75 stop_actor_system(); 76 76 … … 80 80 d_msg d_ac2_msg; 81 81 d_ac2_msg.num = 3; 82 d_ac2_0 <<d_ac2_msg;83 d_ac2_1 <<d_ac2_msg;82 d_ac2_0 | d_ac2_msg; 83 d_ac2_1 | d_ac2_msg; 84 84 stop_actor_system(); 85 85 … … 93 93 d_msg d_ac23_msg; 94 94 d_ac23_msg.num = 4; 95 d_ac3_0 <<d_ac23_msg;96 d_ac2_2 <<d_ac23_msg;95 d_ac3_0 | d_ac23_msg; 96 d_ac2_2 | d_ac23_msg; 97 97 stop_actor_system(); 98 98 } // RAII to clean up executor … … 107 107 b1.num = -1; 108 108 c2.num = 5; 109 a3 << b1 <<c2;109 a3 | b1 | c2; 110 110 stop_actor_system(); 111 111 } // RAII to clean up executor … … 120 120 b1.num = -1; 121 121 c2.num = 5; 122 a4 << b1 <<c2;122 a4 | b1 | c2; 123 123 stop_actor_system(); 124 124 } // RAII to clean up executor
Note: See TracChangeset
for help on using the changeset viewer.