From fff966b6855aee6fc0d0d4cd401cdd525a838572 Mon Sep 17 00:00:00 2001 From: Sam McCall Date: Fri, 2 Jul 2021 16:07:11 +0200 Subject: [PATCH] Revert "[clangd] Fix possible assertion fail in TUScheduler" This reverts commit 50566947e98ea845030cfa3b4c199fb9a2052d53. --- clang-tools-extra/clangd/TUScheduler.cpp | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/clang-tools-extra/clangd/TUScheduler.cpp b/clang-tools-extra/clangd/TUScheduler.cpp index 05ce4f9c8272..09c68a3a250b 100644 --- a/clang-tools-extra/clangd/TUScheduler.cpp +++ b/clang-tools-extra/clangd/TUScheduler.cpp @@ -1380,13 +1380,11 @@ bool ASTWorker::blockUntilIdle(Deadline Timeout) const { }; // Make sure ASTWorker has processed all requests, which might issue new // updates to PreamblePeer. - if (WaitUntilASTWorkerIsIdle()) - return false; + WaitUntilASTWorkerIsIdle(); // Now that ASTWorker processed all requests, ensure PreamblePeer has served // all update requests. This might create new PreambleRequests for the // ASTWorker. - if (!PreamblePeer.blockUntilIdle(Timeout)) - return false; + PreamblePeer.blockUntilIdle(Timeout); assert(Requests.empty() && "No new normal tasks can be scheduled concurrently with " "blockUntilIdle(): ASTWorker isn't threadsafe");