摘要:
#线程的两种创建方式 import time from threading import Thread def func(i): time.sleep(0.1) print(i) class myThread(Thread): def __init__(self,n): super().__init__() self.n=n... 阅读全文
摘要:
#管道Pipe from multiprocessing import Process,Pipe #1 def func1(conn2): msg=conn2.recv() print('conn2:',msg) if __name__ == '__main__': conn1,conn2=Pipe() p=Process(target=func1,... 阅读全文