New submission from Giampaolo Rodola' <g.rod...@gmail.com>:
import multiprocessing import multiprocessing.managers def f(n): return n * n def worker(pool): with pool: pool.apply_async(f, (10, )) manager = multiprocessing.managers.SyncManager() manager.start() pool = manager.Pool(processes=4) proc = multiprocessing.Process(target=worker, args=(pool, )) proc.start() proc.join() This is related to BPO-35917 and it fails with: Process Process-2: Traceback (most recent call last): File "/home/giampaolo/cpython/Lib/multiprocessing/process.py", line 302, in _bootstrap self.run() File "/home/giampaolo/cpython/Lib/multiprocessing/process.py", line 99, in run self._target(*self._args, **self._kwargs) File "foo.py", line 54, in worker pool.apply_async(f, (10, )) File "<string>", line 2, in apply_async File "/home/giampaolo/cpython/Lib/multiprocessing/managers.py", line 802, in _callmethod proxytype = self._manager._registry[token.typeid][-1] AttributeError: 'NoneType' object has no attribute '_registry' ---------- messages: 334962 nosy: davin, giampaolo.rodola, pitrou priority: normal severity: normal status: open title: multiprocessing: shared manager Pool fails with AttributeError _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue35919> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com