ruff
cb7f56fb - [red-knot] Don't use latency-sensitive for handlers (#17227)

Comment changes are shownComment changes are hidden
Commit
86 days ago
[red-knot] Don't use latency-sensitive for handlers (#17227) ## Summary The priority latency-sensitive is reserved for actions that need to run immediately because they would otherwise block the user's action. An example of this is a format request. VS code blocks the editor until the save action is complete. That's why formatting a document is very sensitive to delays and it's important that we always have a worker thread available to run a format request *immediately*. Another example are code completions, where it's important that they appear immediately when the user types. On the other hand, showing diagnostics, hover, or inlay hints has high priority but users are used that the editor takes a few ms to compute the overlay. Computing this information can also be expensive (e.g. find all references), blocking the worker for quiet some time (a few 100ms). That's why it's important that those requests don't clog the sensitive worker threads.
Author
Parents
  • crates
    • red_knot_server/src/server
      • File
        api.rs
      • schedule
        • File
          task.rs
    • ruff_server/src/server
      • File
        api.rs
      • schedule
        • File
          task.rs