1 #!/usr/bin/env python 2 from multiprocessing import Process,Manager 3 4 #Manager进程与进程之间通信 5 def Foo(i,dic): 6 dic[i] = 100+i 7 print(dic.values()) 8 if __name__ == '__main__': 9 manage = Manager() 10 dic = manage.dict() 11 for i in range(2): 12 p = Process(target=Foo,args=(i,dic,)) 13 p.start() 14 # p.join() 15 input("")