File tree Expand file tree Collapse file tree 1 file changed +7
-24
lines changed Expand file tree Collapse file tree 1 file changed +7
-24
lines changed Original file line number Diff line number Diff line change @@ -159,32 +159,15 @@ on `greenlets <https://pypi.org/project/greenlet/>`__ instead of threads.
159
159
160
160
To use gevent with {+driver-short+}, call gevent's
161
161
``monkey.patch_all()`` method *before* loading any other modules, as shown in the following
162
- example. Select the :guilabel:`Synchronous` or :guilabel:`Asynchronous` tab to see the
163
- corresponding code:
162
+ example:
164
163
165
- .. tabs::
166
-
167
- .. tab:: Synchronous
168
- :tabid: sync
169
-
170
- .. code-block:: python
171
-
172
- # You must call patch_all() *before* importing any other modules
173
- from gevent import monkey
174
- _ = monkey.patch_all()
175
- from pymongo import MongoClient
176
- client = MongoClient()
177
-
178
- .. tab:: Asynchronous
179
- :tabid: async
180
-
181
- .. code-block:: python
164
+ .. code-block:: python
182
165
183
- # You must call patch_all() *before* importing any other modules
184
- from gevent import monkey
185
- _ = monkey.patch_all()
186
- from pymongo import AsyncMongoClient
187
- client = AsyncMongoClient()
166
+ # You must call patch_all() *before* importing any other modules
167
+ from gevent import monkey
168
+ _ = monkey.patch_all()
169
+ from pymongo import MongoClient
170
+ client = MongoClient()
188
171
189
172
.. important:: Close MongoClient to Avoid Blocking
190
173
You can’t perform that action at this time.
0 commit comments