[ty] Cancel background tasks when shutdown is requested by MichaReiser · Pull Request #20039 · astral-sh/ruff (original) (raw)
Summary
Cancel any background tasks when the client requests the server to shut down.
This ensures that long running tasks like workspace diagnostics or workspace symbols don't run to completion before shutting down the server.
Test Plan
Restarted the server while workspace diagnostics was running. The server exited immediately.