Closes this cursor without acquiring a lock.
(self)
| 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 |
no test coverage detected