summaryrefslogtreecommitdiff
path: root/Lib/multiprocessing
diff options
context:
space:
mode:
authorJesse Noller <jnoller@gmail.com>2009-11-21 14:06:24 +0000
committerJesse Noller <jnoller@gmail.com>2009-11-21 14:06:24 +0000
commitdc2c6088d61f5ce1f1aff90f61e20bcc158ff5c7 (patch)
treeb05f2c601eb6d044a39738ea1bd8e13c3f0b5c78 /Lib/multiprocessing
parente3dc943955c64a2206af2071f15d659e69c91cc1 (diff)
downloadcpython-dc2c6088d61f5ce1f1aff90f61e20bcc158ff5c7.tar.gz
revert unintended change to multiprocessing/queues.py
Diffstat (limited to 'Lib/multiprocessing')
-rw-r--r--Lib/multiprocessing/queues.py20
1 files changed, 2 insertions, 18 deletions
diff --git a/Lib/multiprocessing/queues.py b/Lib/multiprocessing/queues.py
index 67ac49cf61..ea279911b6 100644
--- a/Lib/multiprocessing/queues.py
+++ b/Lib/multiprocessing/queues.py
@@ -47,8 +47,6 @@ class Queue(object):
if sys.platform != 'win32':
register_after_fork(self, Queue._after_fork)
- self.getv = 0
-
def __getstate__(self):
assert_spawning(self)
return (self._maxsize, self._reader, self._writer,
@@ -73,8 +71,6 @@ class Queue(object):
self._poll = self._reader.poll
def put(self, obj, block=True, timeout=None):
- if not isinstance(obj, list):
- debug('put: %s', obj)
assert not self._closed
if not self._sem.acquire(block, timeout):
raise Full
@@ -89,15 +85,11 @@ class Queue(object):
self._notempty.release()
def get(self, block=True, timeout=None):
- self.getv += 1
- debug('self.getv: %s', self.getv)
if block and timeout is None:
self._rlock.acquire()
try:
res = self._recv()
self._sem.release()
- if not isinstance(res, list):
- debug('get: %s', res)
return res
finally:
self._rlock.release()
@@ -112,8 +104,6 @@ class Queue(object):
raise Empty
res = self._recv()
self._sem.release()
- if not isinstance(res, list):
- debug('get: %s', res)
return res
finally:
self._rlock.release()
@@ -239,22 +229,16 @@ class Queue(object):
try:
while 1:
obj = bpopleft()
- if not isinstance(obj, list):
- debug('feeder thread got: %s', obj)
if obj is sentinel:
debug('feeder thread got sentinel -- exiting')
close()
return
+
if wacquire is None:
- if not isinstance(obj, list):
- debug('sending to pipe: %s', obj)
send(obj)
else:
- debug('waiting on wacquire')
- wacquire(timeout=30)
+ wacquire()
try:
- if not isinstance(obj, list):
- debug('sending to pipe: %s', obj)
send(obj)
finally:
wrelease()