I am trying to use Threading in Python, and struggle to kick off two functions at the same time, then wait for both to finish and load returned data into variables in the main code. How can this be achieved?
import threading from threading import Thread func1(): #<do something> return(x,y,z) func2(): #<do something> return(a,b,c) Thread(target=func1).start() Thread(target=func2).start() #<hold until both threads are done, load returned values>
multiprocessing.Dummy.Pool.mapMultiprocessing.dummyis threading @gold_cy -multiprocessing.dummy replicates the API of multiprocessing but is no more than a wrapper around the threading module.