摘要: 1 #!/usr/bin/env python 2 3 from urllib import request 4 import gevent 5 from gevent import monkey 6 import time 7 8 monkey.patch_all() # 把当前程序所有的IO操作给我单独的做上标记。 9 def f(url): 10 resp... 阅读全文
posted @ 2018-09-04 16:04 。低调ヽ继续 阅读(306) 评论(0) 推荐(0) 编辑
摘要: 1 #!/usr/bin/env python 2 3 from multiprocessing import Process,Pool,freeze_support 4 5 import time,os 6 7 def Foo(i): 8 time.sleep(1) 9 print("in process",os.getpid()) 10 re... 阅读全文
posted @ 2018-09-04 14:03 。低调ヽ继续 阅读(133) 评论(0) 推荐(0) 编辑