一.进程 1.1.方式一 from multiprocessing import Process import time #方式一 def task(name): print(f"my name is {name},启动时间") time.sleep(2) print(f"my name is {name},停止时间") if __name__ == '__main__': # 1 创建一个对象 p = Process(target=task, args=('jas
Winpdb is a platform independent graphical GPL Python debugger with support for remote debugging over a network, multiple threads, namespace modification, embedded debugging, encrypted communication and is up to 20 times faster than pdb. Features: GP
一.multiprocess.process模块 1.join方法 阻塞主进程,等待子进程执行完毕再放开阻塞 import time import random from multiprocessing import Process # 单个子进程 def func(index): time.sleep(random.randint(1, 3)) print('发送完毕') if __name__ == '__main__': p = Process(target=func, args=(1,)