标签:rom ret xxxx xxxxx highlight sleep def 进程池 同步
import time from multiprocessing import Process,Pool def f1(n): time.sleep(1) # print(n) return n*n if __name__ == ‘__main__‘: pool = Pool(4) for i in range(10): print(‘xxxxxx‘) res = pool.apply(f1,args=(i,)) print(res)
标签:rom ret xxxx xxxxx highlight sleep def 进程池 同步
原文地址:https://www.cnblogs.com/work14/p/10267099.html