Why python throws “multiprocessing.managers.RemoteError” for shared lock?
问题 I am using python 3.6.7 with Ubuntu 18.04 After running the following script in which every process has its own shared lock : from multiprocessing import Process, Manager def foo(l1): with l1: print('lol') if __name__ == '__main__': processes = [] with Manager() as manager: for cluster in range(10): lock1 = manager.Lock() calc_args = (lock1, ) processes.append(Process(target=foo, args=calc_args)) for p in processes: p.start() for p in processes: p.join() I have strange exception: Process