File tree Expand file tree Collapse file tree 1 file changed +3
-1
lines changed
Expand file tree Collapse file tree 1 file changed +3
-1
lines changed Original file line number Diff line number Diff line change @@ -140,7 +140,7 @@ def run(self):
140140 start_time_cycle = time .time ()
141141
142142 self .receive_action = 0
143- while (Conf .sync_mode and (self .receive_action < Conf .agent_numbers or time . time () - start_time_cycle < Conf . think_time * 10 )) \
143+ while (Conf .sync_mode and (self .receive_action < Conf .agent_numbers )) \
144144 or (not Conf .sync_mode and time .time () - start_time_cycle < Conf .think_time ):
145145 try :
146146 msg = self .action_queue .get (block = True , timeout = 0.001 )
@@ -152,6 +152,8 @@ def run(self):
152152 except :
153153 continue
154154 self .action_parse (msg )
155+ if Conf .sync_mode and (time .time () - start_time_cycle > Conf .think_time * 10 ):
156+ break
155157
156158 while self .action_queue .qsize () > 0 :
157159 self .action_queue .get ()
You can’t perform that action at this time.
0 commit comments