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

Method _start_rtt_monitor

pymongo/asynchronous/monitor.py:182–189  ·  view source on GitHub ↗

Start an _RttMonitor that periodically runs ping.

(self)

Source from the content-addressed store, hash-verified

180 context.cancel()
181
182 async def _start_rtt_monitor(self) -> None:
183 """Start an _RttMonitor that periodically runs ping."""
184 # If this monitor is closed directly before (or during) this open()
185 # call, the _RttMonitor will not be closed. Checking if this monitor
186 # was closed directly after resolves the race.
187 self._rtt_monitor.open()
188 if self._executor._stopped:
189 await self._rtt_monitor.close()
190
191 def gc_safe_close(self) -> None:
192 self._executor.close()

Callers 1

_runMethod · 0.95

Calls 2

openMethod · 0.45
closeMethod · 0.45

Tested by

no test coverage detected