@@ -34,7 +34,7 @@ Using Gevent With Threads
34
34
-------------------------
35
35
36
36
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
38
38
``monkey.patch_all() ``, and create a
39
39
:class: `~pymongo.connection.Connection ` with ``use_greenlets=True ``.
40
40
The :class: `~pymongo.connection.Connection ` will use a special greenlet-aware
@@ -46,18 +46,18 @@ reads in Gevent.
46
46
>>> from gevent import monkey; monkey.patch_socket()
47
47
>>> connection = Connection(use_greenlets = True )
48
48
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.
53
53
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() `.
58
57
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 ``
61
61
62
62
.. doctest ::
63
63
0 commit comments