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

Method make_finalizers

Lib/test/_test_multiprocessing.py:4844–4854  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

4842 exc = e
4843
4844 def make_finalizers():
4845 nonlocal exc
4846 d = {}
4847 while not finish:
4848 try:
4849 # Old Foo's get gradually replaced and later
4850 # collected by the GC (because of the cyclic ref)
4851 d[random.getrandbits(5)] = {Foo() for i in range(10)}
4852 except Exception as e:
4853 exc = e
4854 d.clear()
4855
4856 old_interval = sys.getswitchinterval()
4857 old_threshold = gc.get_threshold()

Callers

nothing calls this directly

Calls 3

FooClass · 0.70
getrandbitsMethod · 0.45
clearMethod · 0.45

Tested by

no test coverage detected