@@ -46,20 +46,19 @@ Closure of Inactive Cursors
4646~~~~~~~~~~~~~~~~~~~~~~~~~~~
4747
4848By default, the server will automatically close the cursor after 10
49- minutes of inactivity or if client has exhausted the cursor. To
50- override this behavior, you can specify the ``noTimeout`` flag in your
51- query using :method:`cursor.addOption()`; however, you should either
52- close the cursor manually or exhaust the cursor. In the
53- :program:`mongo` shell, you can set the ``noTimeout`` flag:
49+ minutes of inactivity, or if client has exhausted the cursor. To
50+ override this behavior in the :program:`mongo` shell, you can use
51+ the :method:`cursor.noCursorTimeout()` method:
5452
5553.. code-block:: javascript
5654
57- var myCursor = db.inventory.find().addOption(DBQuery.Option.noTimeout);
55+ var myCursor = db.inventory.find().noCursorTimeout();
56+
57+ After setting the ``noCursorTimeout`` option, you must either close the cursor
58+ manually with :method:`cursor.close()` or by exhausting the cursor's results.
5859
5960See your :doc:`driver </applications/drivers>` documentation for
60- information on setting the ``noTimeout`` flag. For the :program:`mongo`
61- shell, see :method:`cursor.addOption()` for a complete list of
62- available cursor flags.
61+ information on setting the ``noCursorTimeout`` option.
6362
6463.. _cursor-isolation:
6564
0 commit comments