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

Function _shutdown_monitors

pymongo/synchronous/monitor.py:516–529  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

514
515
516def _shutdown_monitors() -> None:
517 if _MONITORS is None:
518 return
519
520 # Copy the set. Closing monitors removes them.
521 monitors = list(_MONITORS)
522
523 # Close all monitors.
524 for ref in monitors:
525 monitor = ref()
526 if monitor:
527 monitor.gc_safe_close()
528
529 monitor = None
530
531
532def _shutdown_resources() -> None:

Callers

nothing calls this directly

Calls 1

gc_safe_closeMethod · 0.45

Tested by

no test coverage detected