[issue3419] multiprocessing module is racy
Mark Dickinson
report at bugs.python.org
Sun Aug 17 15:29:26 CEST 2008
Mark Dickinson <dickinsm at gmail.com> added the comment:
Here's a patch that fixes the incref problem for me. This *definitely*
needs review from someone more familiar with the multiprocessing module
than I am; I'm not at all confident that it won't break something else.
The original problem: the Server.create method creates shared objects
with an effective reference count of 0, making them vulnerable to
premature garbage collection.
The solution in the patch: create shared objects with a reference count
of 1, and make it the responsibility of the caller of Server.create() to
do a decref later (once a ProxyObject for the created shared object has
been initialized). In effect, Server.create creates and returns a
reference, and the caller then owns that reference and is responsible
for disposing of it.
Added file: http://bugs.python.org/file11138/issue3419.patch
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue3419>
_______________________________________
More information about the Python-bugs-list
mailing list