docs: replace asyncio.create_task pattern with ctx.run() in all examples#61
docs: replace asyncio.create_task pattern with ctx.run() in all examples#61shloimy-wiesel wants to merge 1 commit into
Conversation
Update the three locations that still showed the old manual asyncio.create_task + try/finally pattern to use the recommended ctx.run() approach: the __init__ module docstring quickstart, the context.py module docstring FastAPI example, and the live example/backend/routes/chat.py endpoint. The example backend also drops the _background_tasks GC-protection set and the asyncio import, which ctx.run() makes unnecessary. Co-authored-by: shloimy-wiesel <shloimy-wiesel@users.noreply.github.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
@claude code review this pr |
|
Claude finished @shloimy-wiesel's task in 1m 38s —— View job Code Review
Overall this is a clean, correct docs-and-example migration. The three changed files are consistent with each other and with how Findings
|
Replace the three locations that still showed the old asyncio.create_task + try/finally pattern with the recommended ctx.run() approach: the init module docstring quickstart, the context.py module docstring FastAPI example, and the live example/backend/routes/chat.py endpoint.
The example backend also drops the _background_tasks GC-protection set and the asyncio import, which ctx.run() makes unnecessary.
Closes #58
Generated with Claude Code