MCPcopy Create free account
hub / github.com/mongodb/mongo-python-driver / close

Method close

pymongo/synchronous/monitor.py:199–204  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

197 asyncio.gather(self._executor.join(), self._rtt_monitor.join(), return_exceptions=True) # type: ignore[func-returns-value]
198
199 def close(self) -> None:
200 self.gc_safe_close()
201 self._rtt_monitor.close()
202 # Increment the generation and maybe close the socket. If the executor
203 # thread has the socket checked out, it will be closed when checked in.
204 self._reset_connection()
205
206 def _reset_connection(self) -> None:
207 # Clear our pooled connection.

Callers 5

_runMethod · 0.95
gc_safe_closeMethod · 0.45
_start_rtt_monitorMethod · 0.45
gc_safe_closeMethod · 0.45
_runMethod · 0.45

Calls 2

gc_safe_closeMethod · 0.95
_reset_connectionMethod · 0.95

Tested by

no test coverage detected