一,进程的开启方式 利用模块开启进程 from multiprocessing import Process import time,random import os def piao(name): print(os.getppid(),os.getpid()) print('%s is piaoing' %name) # time.sleep(random.randint(1,3)) print('%s is piao end' %name) if __name__ == '__main__'…
一,进程的开启方式 利用模块开启进程 from multiprocessing import Process import time,random import os def piao(name): print(os.getppid(),os.getpid()) print('%s is piaoing' %name) # time.sleep(random.randint(1,3)) print('%s is piao end' %name) if __name__ == '__main__'…