[PATCH] D50502: [clangd] Initial cancellation mechanism for LSP requests.
Kadir Cetinkaya via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Fri Aug 24 01:50:33 PDT 2018
kadircet marked 2 inline comments as done.
kadircet added inline comments.
================
Comment at: clangd/ClangdLSPServer.cpp:351
+ [this](llvm::Expected<CodeCompleteResult> List) {
+ auto _ = llvm::make_scope_exit([this]() { CleanupTaskHandle(); });
+
----------------
ilya-biryukov wrote:
> CleanupTaskHandle() can run in a separate thread, so can potentially run before the `StoreTaskHandle` call.
> To avoid memory leaks in that case, let's preallocate the entry **before** calling `codeComplete`
Thanks!
Repository:
rCTE Clang Tools Extra
https://reviews.llvm.org/D50502
More information about the cfe-commits
mailing list