zynthian_engine_modui.py 文件源码

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

项目:zynthian-ui 作者: zynthian 项目源码 文件源码
def start_websocket(self):
        logging.info("Connecting to MOD-UI websocket...")
        i=0
        while i<100:
            try:
                self.websocket = websocket.create_connection(self.websocket_url)
                break
            except:
                i=i+1
                sleep(0.1)
        if i<100:
            self.ws_thread=Thread(target=self.task_websocket, args=())
            self.ws_thread.daemon = True # thread dies with the program
            self.ws_thread.start()
            return True
        else:
            return False
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号