summaryrefslogtreecommitdiffstats
path: root/Lib/multiprocessing/queues.py
diff options
context:
space:
mode:
authorDavin Potts <python@discontinuity.net>2016-09-09 23:03:10 (GMT)
committerDavin Potts <python@discontinuity.net>2016-09-09 23:03:10 (GMT)
commit5458647bb867770fc3d830a618cef6994fdfac4b (patch)
treef16fef69f4ddf36872152328fe302d22e2258763 /Lib/multiprocessing/queues.py
parentf1024f74250d534d16a9970e5093b3b4e693b398 (diff)
downloadcpython-5458647bb867770fc3d830a618cef6994fdfac4b.zip
cpython-5458647bb867770fc3d830a618cef6994fdfac4b.tar.gz
cpython-5458647bb867770fc3d830a618cef6994fdfac4b.tar.bz2
Issue #28053: Applying refactorings, docs and other cleanup to follow.
Diffstat (limited to 'Lib/multiprocessing/queues.py')
-rw-r--r--Lib/multiprocessing/queues.py10
1 files changed, 5 insertions, 5 deletions
diff --git a/Lib/multiprocessing/queues.py b/Lib/multiprocessing/queues.py
index 786a303..dda03dd 100644
--- a/Lib/multiprocessing/queues.py
+++ b/Lib/multiprocessing/queues.py
@@ -23,9 +23,9 @@ import _multiprocessing
from . import connection
from . import context
+_ForkingPickler = context.reduction.ForkingPickler
from .util import debug, info, Finalize, register_after_fork, is_exiting
-from .reduction import ForkingPickler
#
# Queue type using a pipe, buffer and thread
@@ -110,7 +110,7 @@ class Queue(object):
finally:
self._rlock.release()
# unserialize the data after having released the lock
- return ForkingPickler.loads(res)
+ return _ForkingPickler.loads(res)
def qsize(self):
# Raises NotImplementedError on Mac OSX because of broken sem_getvalue()
@@ -238,7 +238,7 @@ class Queue(object):
return
# serialize the data before acquiring the lock
- obj = ForkingPickler.dumps(obj)
+ obj = _ForkingPickler.dumps(obj)
if wacquire is None:
send_bytes(obj)
else:
@@ -342,11 +342,11 @@ class SimpleQueue(object):
with self._rlock:
res = self._reader.recv_bytes()
# unserialize the data after having released the lock
- return ForkingPickler.loads(res)
+ return _ForkingPickler.loads(res)
def put(self, obj):
# serialize the data before acquiring the lock
- obj = ForkingPickler.dumps(obj)
+ obj = _ForkingPickler.dumps(obj)
if self._wlock is None:
# writes to a message oriented win32 pipe are atomic
self._writer.send_bytes(obj)