Skip to content

Lets the LSP frontend delegate job interruption to the interrupt API - #369

Merged
ArquintL merged 1 commit into
interrupt-jobs-3-prover-teardownfrom
interrupt-jobs-4-lsp-delegation
Oct 30, 2026
Merged

ArquintL merged 1 commit into
interrupt-jobs-3-prover-teardownfrom
interrupt-jobs-4-lsp-delegation

Conversation

@ArquintL

@ArquintL ArquintL commented Oct 8, 2026

Copy link
Copy Markdown
Member

Stacked on #368.

ViperServerService.stopVerification now performs the interrupt via interruptVerification (#357) and keeps only its LSP-specific behavior: freeing the job's slot immediately, stopping a dependent AST construction, and logging. This fixes that the LSP frontend's interrupt could be starved: its callbacks ran on the verification thread pool, i.e. behind the very tasks they are meant to interrupt when that pool is saturated.

Changes in behavior:

  • The returned future yields true only if a task has actually been interrupted. Previously, it also yielded true if the job had already finished.
  • Stopping a verification that still waits for its AST construction resolves to false within the ask timeout instead of waiting until the AST has been constructed.

JobPool.discardJob is now private to the vsi package. Frontends use discardAstJob and the new discardVerificationJobEagerly instead.

🤖 Generated with Claude Code

Copilot AI balanced review requested due to automatic review settings October 8, 2026 09:32

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@ArquintL
ArquintL added this pull request to stack #370 October 8, 2026 09:34
`ViperServerService.stopVerification` now interrupts via
`interruptVerification` and only keeps its frontend-specific behavior
(eagerly freeing the job's slot, stopping a dependent AST construction, and
logging). Its interrupt can thus no longer be starved: its callbacks ran on
the verification thread pool, i.e. behind the very tasks they are meant to
interrupt if the pool is saturated.

Observable changes: the returned future yields true only if a task has
actually been interrupted, and stopping a verification that still waits for
its AST construction resolves to false within the ask timeout instead of
stalling until the AST is constructed.

`JobPool.discardJob` is now private to the vsi layer. Frontends use
`discardAstJob` and the new `discardVerificationJobEagerly` instead.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
@rayman2000
rayman2000 force-pushed the interrupt-jobs-4-lsp-delegation branch from cd6ca6d to 6fff484 Compare October 30, 2026 11:14
@ArquintL
ArquintL enabled stacked auto-merge October 30, 2026 11:19
@ArquintL
ArquintL added this pull request to the merge queue Oct 30, 2026
Merged via the queue into master with commit 51d8596 Oct 30, 2026
13 checks passed
@ArquintL
ArquintL deleted the interrupt-jobs-4-lsp-delegation branch October 30, 2026 11:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants