Function
take_from_cache
(frame: FrameType, event: str, _arg: Unused)
Source from the content-addressed store, hash-verified
| 236 | |
| 237 | # Interpreters run a profile hook with tracing off, so coverage does not record its body. |
| 238 | def take_from_cache(frame: FrameType, event: str, _arg: Unused) -> None: # pragma: no cover |
| 239 | if event == "call" and frame.f_code is BaseFileLock.__del__.__code__ and not handed_out: |
| 240 | handed_out.append(FileLock(lock_path, is_singleton=True, thread_local=thread_local)) |
| 241 | handed_out[0].acquire() |
| 242 | |
| 243 | sys.setprofile(take_from_cache) |
| 244 | try: |
Callers
nothing calls this directly
Tested by
no test coverage detected