西行妖

Recent content on 西行妖

马上订阅 西行妖 RSS 更新: https://my.toho.red/index.xml

python3将对象作为线程使用

2023年7月10日 19:15
新建一个对象: class test(Threading.thread): # 当运行start()方法时默认运行此方法 def run(): print(helloworld) 将对象作为新线程启动: test_thread = test() test_thread.start() test_thread.join() ... 这样做的好处:在某些在某一个线程需要调用