- Timestamp:
- Nov 11, 2024, 10:30:53 PM (2 months ago)
- Branches:
- master
- Children:
- a3af522
- Parents:
- 105fb21
- Location:
- tests/concurrency/actors
- Files:
-
- 9 edited
Legend:
- Unmodified
- Added
- Removed
-
tests/concurrency/actors/dynamic.cfa
r105fb21 r41882628 48 48 49 49 executor e{ 0, 1, 1, false }; 50 start_actor_system( e ); 51 50 actor_start( e ); 52 51 sout | "started"; 53 52 … … 58 57 *d_actor | *d_msg; 59 58 60 stop_actor_system(); 61 59 actor_stop(); 62 60 sout | "stopped"; 63 61 } -
tests/concurrency/actors/executor.cfa
r105fb21 r41882628 84 84 85 85 sout | "starting"; 86 87 start_actor_system( e ); 88 86 actor_start( e ); 89 87 sout | "started"; 90 91 88 d_actor actors[ Actors ]; 92 93 89 for ( i; Actors ) { 94 90 actors[i] | shared_msg; 95 91 } // for 96 97 92 sout | "stopping"; 98 99 stop_actor_system(); 100 93 actor_stop(); 101 94 sout | "stopped"; 102 95 } -
tests/concurrency/actors/inherit.cfa
r105fb21 r41882628 29 29 sout | "Start"; 30 30 { 31 start_actor_system();31 actor_start(); 32 32 D_msg * dm = alloc(); 33 33 (*dm){}; … … 40 40 *s | *dm; 41 41 *s2 | *dm2; 42 stop_actor_system();42 actor_stop(); 43 43 } 44 44 { 45 start_actor_system();45 actor_start(); 46 46 Server s[2]; 47 47 D_msg * dm = alloc(); … … 51 51 s[0] | *dm; 52 52 s[1] | *dm2; 53 stop_actor_system();53 actor_stop(); 54 54 } 55 55 sout | "Finished"; -
tests/concurrency/actors/inline.cfa
r105fb21 r41882628 38 38 processor p; 39 39 { 40 start_actor_system(); // sets up executor40 actor_start(); // sets up executor 41 41 d_actor da; 42 42 d_msg * dm = alloc(); 43 43 (*dm){ 42, 2423 }; 44 44 da | *dm; 45 stop_actor_system(); // waits until actors finish45 actor_stop(); // waits until actors finish 46 46 } 47 47 { 48 start_actor_system(); // sets up executor48 actor_start(); // sets up executor 49 49 d_actor da; 50 50 d_msg2 dm{ 29079 }; … … 54 54 virtual_dtor * v = &dm; 55 55 da | dm; 56 stop_actor_system(); // waits until actors finish56 actor_stop(); // waits until actors finish 57 57 } 58 58 } -
tests/concurrency/actors/matrixMultiply.cfa
r105fb21 r41882628 88 88 89 89 sout | "starting"; 90 91 start_actor_system( e ); 92 90 actor_start( e ); 93 91 sout | "started"; 94 95 92 derived_msg messages[xr]; 96 97 93 derived_actor actors[xr]; 98 94 … … 100 96 messages[r]{ Z[r], X[r], Y }; 101 97 } // for 102 103 98 for ( r; xr ) { 104 99 actors[r] | messages[r]; … … 106 101 107 102 sout | "stopping"; 108 109 stop_actor_system(); 110 103 actor_stop(); 111 104 sout | "stopped"; 112 105 -
tests/concurrency/actors/pingpong.cfa
r105fb21 r41882628 47 47 processor p[Processors - 1]; 48 48 49 start_actor_system( Processors ); // test passing number of processors49 actor_start( Processors ); // test passing number of processors 50 50 ping pi_actor; 51 51 pong po_actor; … … 54 54 p_msg m; 55 55 pi_actor | m; 56 stop_actor_system();56 actor_stop(); 57 57 58 58 sout | "end"; -
tests/concurrency/actors/poison.cfa
r105fb21 r41882628 15 15 sout | "Finished"; 16 16 { 17 start_actor_system();17 actor_start(); 18 18 Server s[10]; 19 19 for ( i; 10 ) { 20 20 s[i] | finished_msg; 21 21 } 22 stop_actor_system();22 actor_stop(); 23 23 } 24 24 25 25 sout | "Delete"; 26 26 { 27 start_actor_system();27 actor_start(); 28 28 for ( i; 10 ) { 29 29 Server * s = alloc(); … … 31 31 (*s) | delete_msg; 32 32 } 33 stop_actor_system();33 actor_stop(); 34 34 } 35 35 36 36 sout | "Destroy"; 37 37 { 38 start_actor_system();38 actor_start(); 39 39 Server s[10]; 40 40 for ( i; 10 ) 41 41 s[i] | destroy_msg; 42 stop_actor_system();42 actor_stop(); 43 43 for ( i; 10 ) 44 44 if (s[i].val != 777) -
tests/concurrency/actors/static.cfa
r105fb21 r41882628 45 45 46 46 executor e{ 0, 1, 1, false }; 47 start_actor_system( e ); 48 47 actor_start( e ); 49 48 sout | "started"; 50 51 49 derived_msg msg; 52 53 50 derived_actor actor; 54 55 51 actor | msg; 56 57 stop_actor_system(); 58 52 actor_stop(); 59 53 sout | "stopped"; 60 54 } -
tests/concurrency/actors/types.cfa
r105fb21 r41882628 67 67 68 68 sout | "basic test"; 69 start_actor_system( Processors ); // test passing number of processors69 actor_start( Processors ); // test passing number of processors 70 70 derived_actor a; 71 71 d_msg b, c; … … 73 73 c.num = 2; 74 74 a | b | c; 75 stop_actor_system();75 actor_stop(); 76 76 77 77 sout | "same message and different actors test"; 78 start_actor_system(); // let system detect # of processors78 actor_start(); // let system detect # of processors 79 79 derived_actor2 d_ac2_0, d_ac2_1; 80 80 d_msg d_ac2_msg; … … 82 82 d_ac2_0 | d_ac2_msg; 83 83 d_ac2_1 | d_ac2_msg; 84 stop_actor_system();84 actor_stop(); 85 85 86 86 … … 88 88 sout | "same message and different actor types test"; 89 89 executor e{ 0, Processors, Processors == 1 ? 1 : Processors * 4, false }; 90 start_actor_system( e ); // pass an explicit executor90 actor_start( e ); // pass an explicit executor 91 91 derived_actor2 d_ac2_2; 92 92 derived_actor3 d_ac3_0; … … 95 95 d_ac3_0 | d_ac23_msg; 96 96 d_ac2_2 | d_ac23_msg; 97 stop_actor_system();97 actor_stop(); 98 98 } // RAII to clean up executor 99 99 … … 101 101 sout | "different message types, one actor test"; 102 102 executor e{ 1, Processors, Processors == 1 ? 1 : Processors * 4, true }; 103 start_actor_system( Processors );103 actor_start( Processors ); 104 104 derived_actor3 a3; 105 105 d_msg b1; … … 108 108 c2.num = 5; 109 109 a3 | b1 | c2; 110 stop_actor_system();110 actor_stop(); 111 111 } // RAII to clean up executor 112 112 … … 114 114 sout | "nested inheritance actor test"; 115 115 executor e{ 1, Processors, Processors == 1 ? 1 : Processors * 4, true }; 116 start_actor_system( Processors );116 actor_start( Processors ); 117 117 derived_actor4 a4; 118 118 d_msg b1; … … 121 121 c2.num = 5; 122 122 a4 | b1 | c2; 123 stop_actor_system();123 actor_stop(); 124 124 } // RAII to clean up executor 125 125
Note: See TracChangeset
for help on using the changeset viewer.