QA_Queue_standard.py 文件源码

python
阅读 27 收藏 0 点赞 0 评论 0

项目:QUANTAXIS 作者: yutiansut 项目源码 文件源码
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)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号