def run(self):
while self.__running.isSet():
self.__flag.wait()
while not self.thread_stop:
'?????????,?????????'
try:
if self.queue.empty() is False:
__task = self.queue.get() # ????
assert isinstance(__task, dict)
if __task['func'] != None:
eval(__task['func'])
self.queue.__task_done() # ??????
else:
pass
else:
QA_util_log_info("From Engine %s Engine will waiting for new task ..." % str(
threading.current_thread()))
time.sleep(1)
except:
time.sleep(1)
self.run()
__res = self.__QA_queue_status() # ????????
if __res > 0:
#QA_util_log_info("From Engine %s: There are still %d tasks to do" % (str(threading.current_thread()), __res))
pass
# input()
threading.Timer(0.005, self.run)
评论列表
文章目录