diff --git a/clang-tools-extra/clangd/TUScheduler.cpp b/clang-tools-extra/clangd/TUScheduler.cpp index 71548b59cc308..75d878c9ee07a 100644 --- a/clang-tools-extra/clangd/TUScheduler.cpp +++ b/clang-tools-extra/clangd/TUScheduler.cpp @@ -501,6 +501,7 @@ class PreambleThread { } { + std::unique_lock Lock(Mutex); WithContext Guard(std::move(CurrentReq->Ctx)); // Note that we don't make use of the ContextProvider here. // Preamble tasks are always scheduled by ASTWorker tasks, and we