multiprocessing Basics¶ The simplest way to spawn a second process is to instantiate a Process object with a target function and call start() to let it begin working. import multiprocessing def worker(): """worker function""" print('Worker') if __name__ == '__main__': jobs = [] for i in range(5): p = multiprocessing.Process(target=worker) jobs.append(p) p.start() The output includes the word “Work
