diff --git a/clang-tools-extra/clangd/TUScheduler.cpp b/clang-tools-extra/clangd/TUScheduler.cpp index a112b666e9ab..4c6c8c679be3 100644 --- a/clang-tools-extra/clangd/TUScheduler.cpp +++ b/clang-tools-extra/clangd/TUScheduler.cpp @@ -498,6 +498,8 @@ public: // Build the preamble and let the waiters know about it. build(std::move(*CurrentReq)); } + // Releasing the throttle before destroying the request assists testing. + Throttle.reset(); bool IsEmpty = false; { std::lock_guard Lock(Mutex);