ziyan_main.py 文件源码

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

项目:ziyan 作者: maboss-YCMan 项目源码 文件源码
def work(self, queues, **kwargs):
        # ??????queue??????
        self.command_queue = command_queue = queues['command_queue']
        self.data_queue = data_queue = queues['data_queue']

        while True:
            # ????
            cmd = command_queue.get()

            # ??????????
            if cmd:
                raw_datas = self.user_check(cmd)

                if isinstance(raw_datas, types.GeneratorType):
                    for raw_data in raw_datas:
                        # ?????????handler
                        data_queue.put(raw_data)
                else:
                    # ?????????handler
                    data_queue.put(raw_datas)
            else:
                log.error('\nNo command received')

            kwargs['record'].thread_signal[kwargs['name']] = time.time()
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号