http://www.cnblogs.com/linhaifeng/articles/7428874.html#_label6
from multiprocessing import Process import time import os class MyProcess(Process): def __init__(self, num): super(MyProcess, self).__init__() self.num = num def run(self): time.sleep(1) print(self.is_alive(), self.num, self.pid) time.sleep(1) if __name__ == "__main__": prs = [] for i in range(5): p = MyProcess(i) prs.append(i) p.start() ''' True 1 11848 True 3 14252 True 4 5512 True 2 8252 True 0 9892 '''