@@ -155,14 +155,11 @@ def machine_operate(server, port_nums, clock_rate, m_id, upper_random_num, tot_t
155
155
server2 = MessageServer ('localhost' , port_nums [1 ], Queue (), threading .Lock ())
156
156
server3 = MessageServer ('localhost' , port_nums [2 ], Queue (), threading .Lock ())
157
157
158
- # # Get all the machines to process queues
159
- # Process(target=machine_operate, args=(server1, port_nums, random.randint(1, 6), 1)).start()
160
- # Process(target=machine_operate, args=(server2, port_nums, random.randint(1, 6), 2)).start()
161
- # Process(target=machine_operate, args=(server3, port_nums, random.randint(1, 6), 3)).start()
162
- Process (target = machine_operate , args = (server1 , port_nums , 1 , 1 , upper_random_num )).start ()
163
- Process (target = machine_operate , args = (server2 , port_nums , 3 , 2 , upper_random_num )).start ()
164
- Process (target = machine_operate , args = (server3 , port_nums , 6 , 3 , upper_random_num )).start ()
165
-
158
+ # Get all the machines to process queues
159
+ Process (target = machine_operate , args = (server1 , port_nums , random .randint (1 , 6 ), 1 , upper_random_num )).start ()
160
+ Process (target = machine_operate , args = (server2 , port_nums , random .randint (1 , 6 ), 2 , upper_random_num )).start ()
161
+ Process (target = machine_operate , args = (server3 , port_nums , random .randint (1 , 6 ), 3 , upper_random_num )).start ()
162
+
166
163
time .sleep (60 )
167
164
168
165
server1 .close ()
0 commit comments