Skip to content

Commit 0e026ed

Browse files
committed
More doc cleanups.
1 parent 7317776 commit 0e026ed

File tree

1 file changed

+11
-11
lines changed

1 file changed

+11
-11
lines changed

doc/examples/gevent.rst

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ Using Gevent With Threads
3434
-------------------------
3535

3636
If you need to use standard Python threads in the same process as Gevent and
37-
greenlets, you can run only ``monkey.patch_socket()``, rather than
37+
greenlets, you only need to run ``monkey.patch_socket()``, rather than
3838
``monkey.patch_all()``, and create a
3939
:class:`~pymongo.connection.Connection` with ``use_greenlets=True``.
4040
The :class:`~pymongo.connection.Connection` will use a special greenlet-aware
@@ -46,18 +46,18 @@ reads in Gevent.
4646
>>> from gevent import monkey; monkey.patch_socket()
4747
>>> connection = Connection(use_greenlets=True)
4848

49-
:class:`~pymongo.replica_set_connection.ReplicaSetConnection` with
50-
``use_greenlets=True`` will also use a greenlet-aware pool. Additionally, it
51-
will use a background greenlet instead of a background thread to monitor the
52-
state of the replica set.
49+
An instance of :class:`~pymongo.replica_set_connection.ReplicaSetConnection`
50+
created with ``use_greenlets=True`` will also use a greenlet-aware pool.
51+
Additionally, it will use a background greenlet instead of a background thread
52+
to monitor the state of the replica set.
5353

54-
:meth:`~pymongo.replica_set_connection.ReplicaSetConnection.start_request()`
55-
with :class:`~pymongo.ReadPreference` PRIMARY
56-
ensures that the current greenlet uses the same socket for all operations until
57-
a call to :meth:`end_request()`.
54+
Using :meth:`~pymongo.replica_set_connection.ReplicaSetConnection.start_request()`
55+
with :class:`~pymongo.ReadPreference` PRIMARY ensures that the current greenlet
56+
uses the same socket for all operations until a call to :meth:`end_request()`.
5857

59-
`use_greenlets` with ReplicaSetConnection requires
60-
`Gevent <http://gevent.org/>`_ to be installed.
58+
You must `install Gevent <http://gevent.org/>`_ to use
59+
:class:`~pymongo.replica_set_connection.ReplicaSetConnection`
60+
with ``use_greenlets=True``
6161

6262
.. doctest::
6363

0 commit comments

Comments
 (0)