import threading from time import sleep from msalt_proxy.client import Client def f(t): print t cli=Client(t,‘*‘,role=‘server‘) cli.sys.ping() from multiprocessing import Process if __name__ == ‘__main__‘: p = Process(target=f, args=(‘ljx2‘,)) p.start() p.join() p1 = Process(target=f, args=(‘ljx1,)) p1.start() p1.join()
原文:http://www.cnblogs.com/Xjng/p/3794948.html