When using multiprocessing and spawn in python, use self.a in __getattr__ cause infinite loop
When using multiprocessing and spawn in python, use self.a in __getattr__ cause infinite loop Question: The following code will recurrent the bug: from multiprocessing import Process, set_start_method class TestObject: def __init__(self) -> None: self.a = lambda *args: {} def __getattr__(self, item): return self.a class TestProcess(Process): def __init__(self, textobject, **kwargs): super(TestProcess, self).__init__(**kwargs) self.testobject = textobject def …