Add os.walk to asyncio loop blocking detection (#118769)

This commit is contained in:
J. Nick Koston
2024-06-03 23:53:37 -05:00
committed by GitHub
parent 53ab215dfc
commit 553311cc7d
2 changed files with 18 additions and 1 deletions

View File

@ -67,6 +67,9 @@ def enable() -> None:
glob.iglob = protect_loop(
glob.iglob, strict_core=False, strict=False, loop_thread_id=loop_thread_id
)
os.walk = protect_loop(
os.walk, strict_core=False, strict=False, loop_thread_id=loop_thread_id
)
if not _IN_TESTS:
# Prevent files being opened inside the event loop