multitasking

Executing multiple functions simultaneously

Executing multiple functions simultaneously Question: I’m trying to run two functions simultaneously in Python. I have tried the below code which uses multiprocessing but when I execute the code, the second function starts only after the first is done. from multiprocessing import Process def func1: #does something def func2: #does something if __name__==’__main__’: p1 = …

Total answers: 6