File tree Expand file tree Collapse file tree 1 file changed +7
-0
lines changed Expand file tree Collapse file tree 1 file changed +7
-0
lines changed Original file line number Diff line number Diff line change @@ -420,3 +420,10 @@ the collection:
420
420
DuplicateKeyError: E11000 duplicate key error index: test_database.profiles.$user_id_1 dup key: { : 212 }
421
421
422
422
.. seealso :: The MongoDB documentation on `indexes <https://www.mongodb.com/docs/manual/indexes/>`_
423
+
424
+ Task Cancellation
425
+ -----------------
426
+ `Cancelling <https://docs.python.org/3/library/asyncio-task.html#task-cancellation >`_ an asyncio Task
427
+ that is running a PyMongo operation is treated as a fatal interrupt. Any connections, cursors, and transactions
428
+ involved in a cancelled Task will be safely closed and cleaned up as part of the cancellation. If those resources are
429
+ also used elsewhere, attempting to utilize them after the cancellation will result in an error.
You can’t perform that action at this time.
0 commit comments