Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Deactivate VSCode extension asynchronously
When using HLSL Tools on MacOS, orphaned ShaderTools.LanguageServer processes will accumulate, wasting memory. This happens after closing and opening VSCode repeatedly. This does not appear to happen on Windows in my experience. microsoft/vscode#35196 (comment) The above GitHub issue details other developers' experiences with the same problem. The solution presented by dbaeumer was to return a `Promise` from an exported `deactivate()`. https://code.visualstudio.com/api/references/activation-events#Start-up This is confirmed by the above VSCode docs. Extensions with asynchronous cleanup processes must return a `Promise` from their `deactivate()`. As `LanguageServerClient.stop()` returns a `Promise`, we are obligated to return it when deactivating.
- Loading branch information