(app: Starlette)
| 109 | |
| 110 | @asynccontextmanager |
| 111 | async def lifespan_context(app: Starlette) -> AsyncGenerator[None, None]: |
| 112 | nonlocal startup_task, startup_loop, shutdown_task, shutdown_loop |
| 113 | |
| 114 | startup_task = current_task() |
| 115 | startup_loop = get_identity() |
| 116 | async with anyio.create_task_group(): |
| 117 | yield |
| 118 | shutdown_task = current_task() |
| 119 | shutdown_loop = get_identity() |
| 120 | |
| 121 | async def loop_id(request: Request) -> JSONResponse: |
| 122 | return JSONResponse(get_identity()) |
nothing calls this directly
no test coverage detected