-
Notifications
You must be signed in to change notification settings - Fork 155
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Using AsyncAdaptive #1088
Using AsyncAdaptive #1088
Conversation
d3cbf24
to
61ae197
Compare
/// <remarks> | ||
/// Since the task can be references multiple times in the dependency graph, it is important to cancel it only after there are no more references to it. | ||
/// </remarks> | ||
type internal RefCountingTaskCreator<'a>(create: CancellationToken -> Task<'a>) = |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I added comments in the module, please ask any clarifying questions. Also @krauthaufen please let me know if I've incorrectly done something here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey, I currently have a toddler-with-feaver-problem but once this is over I'll take some time to look over that...
c5fb1f3
to
283c161
Compare
14e11f4
to
88731dc
Compare
8743623
to
f6cc022
Compare
🎉🎉🎉🥳🥳🥳 |
WHAT
🤖 Generated by Copilot at 283c161
This pull request makes various parts of the FsAutoComplete project asynchronous and uses new libraries and utilities for better error handling and performance. It affects the code generation, analysis, and formatting features, as well as the LSP server and the code fixes modules. It also refactors some code and adds new dependencies to the
paket.dependencies
andsrc/FsAutoComplete.Core/paket.references
files.🤖 Generated by Copilot at 283c161
🔄🚀🐛
WHY
This converts the Adaptive LSP Server to use
AsyncAval
. This primarily comes from @krauthaufen's AsyncAdaptiveSketch with some tweaks to use IcedTasks and a Computation Expression.openedFilesWithChanges
. Previously this would have to hit multiple locks in anAMap<string, AVal<VolatileFile>>
to get the latest value, even though it should have been up to date. This now usesAMap<string, VolatileFile>
which speeds this up considerable.FSharpChecker
start on a new thread rather than use the threadpool. This keeps the server responsive while things happen in the background.Some nice benefits I've noticed:
HOW
🤖 Generated by Copilot at 283c161