Python Multiprocessing Calling Object Method
I want to use Python's multiprocessing module to start a new process which creates some other object and calls that objects loops_forever method. In my main class I have: import Ot
Solution 1:
When you do target=my_other_service.loops_forever()
, you call loops_forever
. To pass it as a function, rather than call it, you would drop the parentheses, like target=my_other_service.loops_forever
.
Post a Comment for "Python Multiprocessing Calling Object Method"