Skip to content

Commit 77b728e

Browse files
author
A. Jesse Jiryu Davis
committed
Slight updates to greenlet / Gevent documentation
1 parent a5761ff commit 77b728e

File tree

2 files changed

+9
-5
lines changed

2 files changed

+9
-5
lines changed

pymongo/connection.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -167,7 +167,8 @@ def __init__(self, host=None, port=None, max_pool_size=10,
167167
168168
.. seealso:: :meth:`end_request`
169169
.. versionchanged:: 2.2
170-
Added `auto_start_request` option back.
170+
Added `auto_start_request` option back. Added `use_greenlets`
171+
option.
171172
.. versionchanged:: 2.1
172173
Support `w` = integer or string.
173174
Added `ssl` option.

pymongo/replica_set_connection.py

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -177,9 +177,12 @@ def __init__(self, hosts_or_uri=None, max_pool_size=10,
177177
consistency guarantees. (The semantics of auto_start_request,
178178
:class:`~pymongo.ReadPreference`, and :class:`ReplicaSetConnection`
179179
may change in future releases of PyMongo.)
180-
- `use_greenlets` (optional): if ``True``, :meth:`start_request()`
181-
will ensure that the current greenlet uses the same socket for all
182-
operations until :meth:`end_request()`
180+
- `use_greenlets` (optional): if ``True``, use a background Greenlet
181+
instead of a background thread to monitor state of replica set.
182+
:meth:`start_request()` will ensure that the current greenlet uses
183+
the same socket for all operations until :meth:`end_request()`.
184+
`use_greenlets` with ReplicaSetConnection requires `Gevent
185+
<http://gevent.org/>`_ to be installed.
183186
- `slave_okay` or `slaveOk` (deprecated): Use `read_preference`
184187
instead.
185188
- `host`: For compatibility with connection.Connection. If both
@@ -194,7 +197,7 @@ def __init__(self, hosts_or_uri=None, max_pool_size=10,
194197
195198
196199
.. versionchanged:: 2.2
197-
Added `auto_start_request` option.
200+
Added `auto_start_request` and `use_greenlets` options.
198201
Added support for `host`, `port`, and `network_timeout` keyword
199202
arguments for compatibility with connection.Connection.
200203
.. versionadded:: 2.1

0 commit comments

Comments
 (0)