(ctx: DCtx, method: str, params: Mapping[str, Any] | None)
| 163 | handler_started = anyio.Event() |
| 164 | |
| 165 | async def on_request(ctx: DCtx, method: str, params: Mapping[str, Any] | None) -> dict[str, Any]: |
| 166 | handler_started.set() |
| 167 | await ctx.cancel_requested.wait() |
| 168 | return {"completed": "after-cancel"} |
| 169 | |
| 170 | async def on_notify(ctx: DCtx, method: str, params: Mapping[str, Any] | None) -> None: |
| 171 | pass # the cancelled notification is teed here; nothing to observe |