愤怒中的小草

博客园 首页 新随笔 联系 订阅 管理

2019年2月22日 #

摘要: """"import osimport time#fork只用于linux中pid = os.fork()print("hello")if pid == 0: print("子进程{},父进程是{}".format(os.getpid(),os.getppid()))else: print("父进程 阅读全文
posted @ 2019-02-22 23:37 愤怒中的小草 阅读(168) 评论(0) 推荐(0) 编辑

摘要: import timefrom concurrent.futures import ThreadPoolExecutor,as_completedfrom concurrent.futures import ProcessPoolExecutor#多进程编程#耗CPU的操作,用多进程编程;对于IO操 阅读全文
posted @ 2019-02-22 22:57 愤怒中的小草 阅读(187) 评论(0) 推荐(0) 编辑