Coverage for docs_src/tutorial/asyncify/tutorial001.py: 100%
9 statements
« prev ^ index » next coverage.py v7.17.2, created at 2026-12-05 11:30 +0000
« prev ^ index » next coverage.py v7.17.2, created at 2026-12-05 11:30 +0000
1# 🚨 Don't use this, it will block the event loop! 🚨
3import time 1abcdefghijk
5import anyio 1abcdefghijk
8def do_sync_work(name: str): 1abcdefghijk
9 time.sleep(1) 1abcdefghijk
10 return f"Hello, {name}" 1abcdefghijk
13async def main(): 1abcdefghijk
14 message = do_sync_work(name="World") 1abcdefghijk
15 print(message) 1abcdefghijk
18anyio.run(main) 1abcdefghijk