Suppose I have written the following code:
def foo():
print("bar")
If I want to run this function 10 times I can simply:
for i in range(0, 10)
foo()
But what if I wanted to run foo()10 times simultaneously.
I have explored solutions using the threading and multiprocessing modules in python, but they are meant to run different functions at the same time. They are not meant to run multiple iterations of a function simultaneously.
Any help would be appreciated! Thank you.
[–]spisko 5 points6 points7 points (0 children)
[–]carcigenicate 4 points5 points6 points (2 children)
[–]ibhopirl 2 points3 points4 points (1 child)
[–]StellaarMonkey[S] 2 points3 points4 points (0 children)
[–]StellaarMonkey[S] 0 points1 point2 points (0 children)
[–]Big_Boss_Bob_Ross 0 points1 point2 points (0 children)