We have a file called functions.py and in that list f has 4 functions like :
f = [f1,f2,f3,f4]
which f[0]() call f1! the question is to call every list member using Thread and put the code in solve function ! but two notes are important :
- Call all of members in on time!
- Threads could be not same as the others.
def solve(f):
th=[]
for i in range(4):
x = threading.Thread(target=f)
x.start()
th.append(x)
for anyt,j in enumerate(th):
j.join()
What's the problem? could anyone helps me?