You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
…#10140)
Fixes#10158
I recommend reviewing commit-by-commit.
Razor has had a `BatchingWorkQueue` for a long while that has dubious
semantics. It is used by three features:
- `OpenDocumentGenerator` - Listens for document updates, computes
generated output for each, and notifies listeners when a document has
been processed.
- `WorkspaceSemanticTokensRefreshPublisher` - Called in the server to
send the client `semanticTokens/refresh` notifications. This really sort
of abuses `BatchingWorkQueue` just for debouncing and only send
notifications every 250 milliseconds.
- `WorkspaceProjectStateChangeDetector` - Listens for Roslyn workspace
and Razor project manager changes and calls into
`IProjectWorkspaceStateGenerator.Update(...)` when a change occurs.
This change fully replaces `BatchingWorkQueue` with a copy of Roslyn's
`AsyncBatchingWorkQueue`, which has consistent semantics and has been
battle-hardened for years. I've updated `OpenDocumentGenerator` and
`WorkspaceProjectStateChangeDetector` above to use
`AsyncBatchingWorkQueue`. For `WorkspaceSemanticTokensRefreshPublisher`
(now `WorkspaceSemanticTokensRefreshNotifier`), I've removed the
`BatchingWorkQueue` altogether and replaced it with simpler logic that
debounces and calls `Task.Delay(...)`.
Many thanks to @CyrusNajmabadi for his help with
`AsyncBatchingWorkQueue`.
@dotnet/razor-compiler: The only relevant compiler changes are in shared
code.
No description provided.
The text was updated successfully, but these errors were encountered: