I have a list of objects and I want to call a method of these objects iteratively in a for loop but to speed up things I need to run this on parallel. Here is an example:
class myObj:
def __init__(self):
self.x = 0
def go(self):
self.x += 1
myList = [myObj() for i in range(100)]
for t in range(1000):
for obj_ in myList:
obj_.go()
How can I run the second loop in parallel? because these objects are distinct it should be possible.