摘要: # 建议所有的界面更新动作都放在主线程中,否则textEdit控件可能会出现程序崩溃的问题 from PySide2.QtWidgets import QApplication from PySide2.QtUiTools import QUiLoader from PySide2.QtCore i 阅读全文
posted @ 2021-02-24 14:21 kevin.l 阅读(792) 评论(0) 推荐(0) 编辑
摘要: # 协程 import time import gevent from gevent import monkey # 猴子补丁 monkey.patch_all() def a(): for i in range(5): print('A', str(i)) # 猴子补丁 中 如果需要睡眠效果,必须 阅读全文
posted @ 2021-02-24 02:53 kevin.l 阅读(37) 评论(0) 推荐(0) 编辑
摘要: from multiprocessing import Process process = Process(target=函数,name=进程的名字,args=(给函数传递的参数)) process.start() 启动进程并执行任务 process.run() 只是执行了任务但是没有启动进程 pr 阅读全文
posted @ 2021-02-24 01:56 kevin.l 阅读(43) 评论(0) 推荐(0) 编辑