Aug-24-2021, 03:27 PM
I finally decided to experiment on the multiprocessing module, however I run straight into a ditch where am currently hitting my head against it's walls. I desperately need some help to get out of this, here is an example of my code structure:-
How do I make it to run while maintaining this structure, that is without moving def abc and def cab to the Top Level Function
import time
import multiprocessing
def vcf():
d='578'
d1='556'
e='678'
e1='64498'
def abc(d,e):
print(d)
print(e)
def cab(d1,e1):
print(d1)
print(e)
p1 = multiprocessing.Process(target=abc,args=(d,e,))
p2 = multiprocessing.Process(target=cab,args=(d1,e1,))
if __name__ == "__main__":
p1.start()
p2.start()
p1.join()
p2.join()
vcf()
finish = time.perf_counter()
print("Finished running after seconds : ",finish) How do I make it to run while maintaining this structure, that is without moving def abc and def cab to the Top Level Function
