MCPcopy Index your code
hub / github.com/mongodb/mongo-python-driver / _die_no_lock

Method _die_no_lock

pymongo/cursor_shared.py:100–115  ·  view source on GitHub ↗

Closes this cursor without acquiring a lock.

(self)

Source from the content-addressed store, hash-verified

98 return cursor_id, address
99
100 def _die_no_lock(self) -> None:
101 """Closes this cursor without acquiring a lock."""
102 try:
103 already_killed = self._killed
104 except AttributeError:
105 # ___init__ did not run to completion (or at all).
106 return
107
108 cursor_id, address = self._prepare_to_die(already_killed)
109 self._collection.database.client._cleanup_cursor_no_lock(
110 cursor_id, address, self._sock_mgr, self._session
111 )
112 if self._session and self._session._implicit:
113 self._session._attached_to_cursor = False
114 self._session = None
115 self._sock_mgr = None
116
117
118# These errors mean that the server has already killed the cursor so there is

Callers 5

__del__Method · 0.95
_send_messageMethod · 0.80
_send_messageMethod · 0.80
_send_messageMethod · 0.80
_send_messageMethod · 0.80

Calls 2

_prepare_to_dieMethod · 0.95

Tested by

no test coverage detected