- Code: Select all
import multiprocessing
def method_name(self, arg=None):
indigo.server.log(str(arg))
indigo.server.log(multiprocessing.current_process().name)
p1 = multiprocessing.Process(name='Foo', target=self.method_name(), args=(arg_to_pass,))
p1.start()
p1.join()
The above seems to run successfully when I invoke it within my plugin, but when I try to access the args that I passed, I get the NoneType default and I don't get the process name 'Foo' but rather the name 'MainProcess'.
Can someone smarter than me please provide an example of how to get a separate process to run within a plugin? I clearly have more to figure out.