We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 22fdc57 commit 35f7955Copy full SHA for 35f7955
clang-tools-extra/clangd/TUScheduler.cpp
@@ -501,6 +501,7 @@ class PreambleThread {
501
}
502
503
{
504
+ std::unique_lock<std::mutex> Lock(Mutex);
505
WithContext Guard(std::move(CurrentReq->Ctx));
506
// Note that we don't make use of the ContextProvider here.
507
// Preamble tasks are always scheduled by ASTWorker tasks, and we
@@ -1329,6 +1330,7 @@ void ASTWorker::startTask(llvm::StringRef Name,
1329
1330
std::optional<UpdateType> Update,
1331
TUScheduler::ASTActionInvalidation Invalidation) {
1332
if (RunSync) {
1333
+ std::lock_guard<std::mutex> Lock(Mutex);
1334
assert(!Done && "running a task after stop()");
1335
runTask(Name, Task);
1336
return;
0 commit comments