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

Mailing List Archive: Python: Checkins

cpython: Make AcquirerProxy.acquire() support timeout argument

 

 

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


python-checkins at python

May 6, 2012, 8:56 AM

Post #1 of 1 (48 views)
Permalink
cpython: Make AcquirerProxy.acquire() support timeout argument

http://hg.python.org/cpython/rev/b4a1d9287780
changeset: 76800:b4a1d9287780
user: Richard Oudkerk <shibturn [at] gmail>
date: Sun May 06 16:45:02 2012 +0100
summary:
Make AcquirerProxy.acquire() support timeout argument

files:
Lib/multiprocessing/managers.py | 5 +++--
1 files changed, 3 insertions(+), 2 deletions(-)


diff --git a/Lib/multiprocessing/managers.py b/Lib/multiprocessing/managers.py
--- a/Lib/multiprocessing/managers.py
+++ b/Lib/multiprocessing/managers.py
@@ -957,8 +957,9 @@

class AcquirerProxy(BaseProxy):
_exposed_ = ('acquire', 'release')
- def acquire(self, blocking=True):
- return self._callmethod('acquire', (blocking,))
+ def acquire(self, blocking=True, timeout=None):
+ args = (blocking,) if timeout is None else (blocking, timeout)
+ return self._callmethod('acquire', args)
def release(self):
return self._callmethod('release')
def __enter__(self):

--
Repository URL: http://hg.python.org/cpython

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.