summaryrefslogtreecommitdiff
path: root/README.md
diff options
context:
space:
mode:
authorandy <andy@whiskeymedia.com>2011-07-17 15:15:15 -0700
committerandy <andy@whiskeymedia.com>2011-07-17 15:15:15 -0700
commit2e185683e310513d4efdcf9ec212115383f03aff (patch)
tree2b23bb4d72d3c45d7e3a07065d5e8cfdb7583f3c /README.md
parent2d428eca210154d07ab4260fdb1cccf14954295e (diff)
downloadredis-py-2e185683e310513d4efdcf9ec212115383f03aff.tar.gz
Pipelines can now be used as Context Managers. Thanks David Wolever. Fixes #160
Diffstat (limited to 'README.md')
-rw-r--r--README.md11
1 files changed, 6 insertions, 5 deletions
diff --git a/README.md b/README.md
index d32fe9a..f77f627 100644
--- a/README.md
+++ b/README.md
@@ -198,11 +198,12 @@ could do something like this:
... # our best bet is to just retry.
... continue
-Note that, because the `Pipeline` must bind to a single connection for the
-duration of a `watch`, care must be taken to ensure that he connection is
-returned to the connection pool by calling the `reset()` method. If the
-`Pipeline` is used as a context manager (as in the example above) `reset()`
-will be called automatically... But it can also be called manually, like this:
+Note that, because the Pipeline must bind to a single connection for the
+duration of a WATCH, care must be taken to ensure that he connection is
+returned to the connection pool by calling the reset() method. If the
+Pipeline is used as a context manager (as in the example above) reset()
+will be called automatically. Of course you can do this the manual way as by
+explicity calling reset():
>>> pipe = r.pipeline()
>>> while 1: