开启子进程的方式2

#
from multiprocessing import Process
#
#
# class MyProcess(Process):
# # 当进程被执行时 其实执行的就是run函数
# def run(self):
# print("这是 run被执行了!")
#
#
#
# def ttt():
# print("11111")
# if __name__ == '__main__':
# mp = MyProcess()
# mp.start()
#
# p = Process(target=ttt)
# p.start()
#

猜你喜欢

转载自www.cnblogs.com/frank007/p/9925132.html