多进程multiprocess模块
multiprocessing
is a package that supports spawning processes using an API similar to the threading
module. The multiprocessing
package offers both local and remote concurrency, effectively side-stepping the Global Interpreter Lock by using subprocesses instead of threads. Due to this, the multiprocessing
module allows the programmer to fully leverage multiple processors on a given machine. It runs on both Unix and Windows.
这个模块的语法结构与threading模块基本相似。
查找到一个多进程的博客连接:https://www.cnblogs.com/Mr-Murray/p/9026955.html
from multiprocessing import Process import time import os def info(): print("