method one
K = os.fork ()
if right == 0:
# Child process
else:
# Parent process
# Rarely used in this way
Second way:
p1 = Process(target=xxxx)
p1.start()
# Master and child processes can be performed
Three ways:
pool = pool (3)
pool.apply_async(xxxxx)
# ,,,, wait for the main process is generally used to perform real tasks in the child, the way to create this non-clogging process pool