Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: Python: Checkins

r76434 - python/trunk/Lib/multiprocessing/queues.py

 

 

Python checkins RSS feed   Index | Next | Previous | View Threaded


python-checkins at python

Nov 21, 2009, 6:20 AM

Post #1 of 1 (119 views)
Permalink
r76434 - python/trunk/Lib/multiprocessing/queues.py

Author: jesse.noller
Date: Sat Nov 21 15:06:24 2009
New Revision: 76434

Log:
revert unintended change to multiprocessing/queues.py

Modified:
python/trunk/Lib/multiprocessing/queues.py

Modified: python/trunk/Lib/multiprocessing/queues.py
==============================================================================
--- python/trunk/Lib/multiprocessing/queues.py (original)
+++ python/trunk/Lib/multiprocessing/queues.py Sat Nov 21 15:06:24 2009
@@ -47,8 +47,6 @@
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 @@
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 @@
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 @@
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 @@
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()
_______________________________________________
Python-checkins mailing list
Python-checkins [at] python
http://mail.python.org/mailman/listinfo/python-checkins

Python checkins RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact Gossamer Threads
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.