diff options
author | Antoine Pitrou <solipsis@pitrou.net> | 2012-04-24 20:56:57 (GMT) |
---|---|---|
committer | Antoine Pitrou <solipsis@pitrou.net> | 2012-04-24 20:56:57 (GMT) |
commit | 5438ed1572f5e379cac8b85ed2226101a1bfcacc (patch) | |
tree | bf6a9df1be40d5d3df6fbfcdee606d5a49fca273 /Lib/multiprocessing/forking.py | |
parent | 9f478c021dc499b0d23ee418c0dcc6b5076524aa (diff) | |
download | cpython-5438ed1572f5e379cac8b85ed2226101a1bfcacc.zip cpython-5438ed1572f5e379cac8b85ed2226101a1bfcacc.tar.gz cpython-5438ed1572f5e379cac8b85ed2226101a1bfcacc.tar.bz2 |
Issue #4892: multiprocessing Connections can now be transferred over multiprocessing Connections.
Patch by Richard Oudkerk (sbt).
Diffstat (limited to 'Lib/multiprocessing/forking.py')
-rw-r--r-- | Lib/multiprocessing/forking.py | 19 |
1 files changed, 0 insertions, 19 deletions
diff --git a/Lib/multiprocessing/forking.py b/Lib/multiprocessing/forking.py index 0cbb741..15fdb0e 100644 --- a/Lib/multiprocessing/forking.py +++ b/Lib/multiprocessing/forking.py @@ -407,25 +407,6 @@ else: return d - # - # Make (Pipe)Connection picklable - # - - # Late import because of circular import - from .connection import Connection, PipeConnection - - def reduce_connection(conn): - if not Popen.thread_is_spawning(): - raise RuntimeError( - 'By default %s objects can only be shared between processes\n' - 'using inheritance' % type(conn).__name__ - ) - return type(conn), (Popen.duplicate_for_child(conn.fileno()), - conn.readable, conn.writable) - - ForkingPickler.register(Connection, reduce_connection) - ForkingPickler.register(PipeConnection, reduce_connection) - # # Prepare current process # |