Expand pylibmc.ClientPool.reserve documentation.

This commit is contained in:
lericson 2010-03-16 23:44:18 +01:00
parent b3b36b3acb
commit 956355ee27

View File

@ -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