Discuss / Python / 加了点注释

加了点注释

Topic source

冲天魔王

#1 Created at ... [Delete] [Delete and Lock User]

子进程要执行的代码

def run_proc(name):

#被调用的子进程
print('Run child process %s (%s)...' % (name, os.getpid()))

if name=='main': print('Parent process %s.' % os.getpid()) p = Process(target=run_proc, args=('test',))

#运行子进程,传递参数
print('Child process will start.')
p.start()
#启动
p.join()
print('Child process end.')

  • 1

Reply