查看pid
from multiprocessing import Process
import time,os
def task():
print('%s is running,parent id is <%s>' %(os.getpid(),os.getppid()))
time.sleep(3)
print('%s is done,...
查看pid
from multiprocessing import Process
import time,os
def task():
print('%s is running,parent id is <%s>' %(os.getpid(),os.getppid()))
time.sleep(3)
print('%s is done,...