I'm trying to figure out a way to run a method of some object in parallel with my main loop.
My goal is to have some loop which reads and pre-processes images, and an object which performs further processing in parallel, without halting the pre-process loop (sort of pipeline?)
I picutred it somehow like this:
class Class1:
def __init__(self):
...
def run(self, arg1):
...
obj1 = Class1()
while(True):
...
<< calculate arg1_value >>
<< start executing obj1.method1(arg1_value) and move on>>
<< print results of obj1.method1 (if they are available) >>
Which python parallel processing method should I use? Or should I work with queues?