python3中在windows10中创建进程
Windows使用mulprocess模块来进行进程调用,但会在父进程copy子进程时会出现子进程并非父进程ID+1的境况,这是操作系统的问题,官网文档给出了解释
https://docs.python.org/2/library/multiprocessing.html?highlight=process#windows
from multiprocessing import Process
import os
# 子进程要执行的代码
def run_proc(name):
print('Run child process %s (%s)...' % (name, os.getpid()