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

Function _shutdown_monitors

pymongo/asynchronous/monitor.py:518–531  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

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

Callers

nothing calls this directly

Calls 1

gc_safe_closeMethod · 0.45

Tested by

no test coverage detected