MCPcopy Index your code
hub / github.com/python/cpython / cb

Function cb

Lib/importlib/_bootstrap.py:448–457  ·  view source on GitHub ↗
(ref, name=name)

Source from the content-addressed store, hash-verified

446 lock = _ModuleLock(name)
447
448 def cb(ref, name=name):
449 _imp.acquire_lock()
450 try:
451 # bpo-31070: Check if another thread created a new lock
452 # after the previous lock was destroyed
453 # but before the weakref callback was called.
454 if _module_locks.get(name) is ref:
455 del _module_locks[name]
456 finally:
457 _imp.release_lock()
458
459 _module_locks[name] = _weakref.ref(lock, cb)
460 finally:

Callers 12

handleEAGAINFunction · 0.85
__exit__Method · 0.85
__aexit__Method · 0.85
test_ignore_retvalMethod · 0.85
test_int_callbackMethod · 0.85
test_ValueErrorMethod · 0.85
test_make_callbackMethod · 0.85

Calls 2

acquire_lockMethod · 0.45
getMethod · 0.45

Tested by 9

test_ignore_retvalMethod · 0.68
test_int_callbackMethod · 0.68
test_ValueErrorMethod · 0.68
test_make_callbackMethod · 0.68