MCPcopy Index your code
hub / github.com/RustPython/RustPython / gc_threshold

Function gc_threshold

Lib/test/support/__init__.py:885–892  ·  view source on GitHub ↗
(*args)

Source from the content-addressed store, hash-verified

883
884@contextlib.contextmanager
885def gc_threshold(*args):
886 import gc
887 old_threshold = gc.get_threshold()
888 gc.set_threshold(*args)
889 try:
890 yield
891 finally:
892 gc.set_threshold(*old_threshold)
893
894def python_is_optimized():
895 """Find if Python was built with optimizations."""

Callers

nothing calls this directly

Calls 2

get_thresholdMethod · 0.80
set_thresholdMethod · 0.80

Tested by

no test coverage detected