摘要: Threads share the address space of the process that created it; processes have their own address space.1.线程共享创建它的进程的地址空间,进程,子进程有独立的地址空间 Threads have direct access to the data segment of its process; ... 阅读全文
posted @ 2018-11-20 21:28 986428528 阅读(174) 评论(0) 推荐(0) 编辑
摘要: 4200 get https://www.baidu.com9392 get https://www.python.org11912 get https://www.openstack.org4200 get https://help.github.com/11828 parse https://w 阅读全文
posted @ 2018-11-20 17:29 986428528 阅读(127) 评论(0) 推荐(0) 编辑
摘要: from multiprocessing import Pool import os,time def work(n): print('%s run'%os.getpid()) time.sleep(3) return n**2 # if __name__=='__main__': # p=Pool(3) # res_list=[] # for i... 阅读全文
posted @ 2018-11-20 15:59 986428528 阅读(119) 评论(0) 推荐(0) 编辑
摘要: import socket from multiprocessing import Pool import os server=socket.socket(socket.AF_INET,socket.SOCK_STREAM) server.setsockopt(socket.SOL_SOCKET,socket.SO_REUSEADDR,1) server.bind(('127.0.0.1',80... 阅读全文
posted @ 2018-11-20 15:57 986428528 阅读(105) 评论(0) 推荐(0) 编辑