摘要:
from multiprocessing import Process import time def func(): while True: time.sleep(0.2) print('我还活着') def func2(): print('in func2 start') time.sleep(8) print('in fu... 阅读全文
摘要:
import socket from multiprocessing import Process def server(conn): msg = '连接成功'.encode('utf-8') conn.send(msg) msg2 = conn.recv(1024).decode('utf-8') print(msg2) conn.close() i... 阅读全文
摘要:
import time from multiprocessing import Process def func(arg1,arg2): print('*'*arg1) time.sleep(5) print('*'*arg2) if __name__ == '__main__': p = Process(target=func,args=(10,20)) ... 阅读全文
摘要:
开启多个子进程 多进程之间的数据隔离问题 开启多进程的第二种方式 阅读全文