next_task_name, next_task_args = self.task_q.get()
if next_task_name:
    task = getattr(self, next_task_name)
answer = task(**next_task_args)
How to use multiprocessing with class instances in Python?