import os
from multiprocessing import Process


def run_proc(name):
    print('Child process {} ({}) Running...'.format(name, os.getpid()))


if __name__ == '__main__':
    print('Parent process %s.' % os.getpid())
    for i in range(5):
        p = Process(target=run_proc, args=(str(i),))
        print('Process will start')
        p.start()
    p.join()
    print('Process end')

826f959abe3c511232890a76adc0c89f769952b6
<mask token>

<mask token>


def run_proc(name):
    print('Child process {} ({}) Running...'.format(name, os.getpid()))


<mask token>

<mask token>


def run_proc(name):
    print('Child process {} ({}) Running...'.format(name, os.getpid()))


if __name__ == '__main__':
    print('Parent process %s.' % os.getpid())
    for i in range(5):
        p = Process(target=run_proc, args=(str(i),))
        print('Process will start')
        p.start()
    p.join()
    print('Process end')

import os
from multiprocessing import Process


def run_proc(name):
    print('Child process {} ({}) Running...'.format(name, os.getpid()))


if __name__ == '__main__':
    print('Parent process %s.' % os.getpid())
    for i in range(5):
        p = Process(target=run_proc, args=(str(i),))
        print('Process will start')
        p.start()
    p.join()
    print('Process end')
