From 956355ee27fab30c6b8620c7be5ad90294a3b7c5 Mon Sep 17 00:00:00 2001 From: lericson Date: Tue, 16 Mar 2010 23:44:18 +0100 Subject: [PATCH] Expand `pylibmc.ClientPool.reserve` documentation. --- pylibmc.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/pylibmc.py b/pylibmc.py index 7204c39..2b5702d 100644 --- a/pylibmc.py +++ b/pylibmc.py @@ -163,7 +163,11 @@ class ClientPool(Queue): @contextmanager def reserve(self, timeout=None): - """Reserve a client, and put it back into the pool when done.""" + """Context manager for reserving a client from the pool. + + If *timeout* is given, it specifiecs how long to wait for a client to + become available. + """ mc = self.get(True, timeout=timeout) try: yield mc