Revert "[clangd] Fix possible assertion fail in TUScheduler"

This reverts commit 50566947e9.
This commit is contained in:
Sam McCall 2021-07-02 16:07:11 +02:00
parent 50566947e9
commit fff966b685
1 changed files with 2 additions and 4 deletions

View File

@ -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");