I am trying to understand parallel processing using multiprocessing in python using the example given in this link https://pymotw.com/2/multiprocessing/basics.html. Here is the code:
def worker(i):
"""worker function"""
print('Worker',i)
return
if __name__ == '__main__':
jobs = []
for i in range(5):
p = multiprocessing.Process(target=worker, args = (i,))
jobs.append(p)
p.start()
p.join()
When I execute this code, I do not get any output in my Jupyter notebook. I also tried other functions but I don't get any output. My python version is 3.8.5.
Thank you.