[PATCH] D129100: [clangd] Support external throttler for preamble builds

Sam McCall via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri Jul 8 03:06:01 PDT 2022


sammccall added inline comments.


================
Comment at: clang-tools-extra/clangd/TUScheduler.cpp:499
         // Build the preamble and let the waiters know about it.
         build(std::move(*CurrentReq));
       }
----------------
kadircet wrote:
> regarding the flakiness, what about resetting the `Throttle` here to trigger the release? it's right after the build and would make sure release happens before the context is destroyed (+ we're not holding any locks)
The critical case never gets here: done() is called while waiting for the throttler, and we never get to build anything.

(And by the time that wait is interrupted, the context is already concurrently being destroyed.)


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D129100/new/

https://reviews.llvm.org/D129100



More information about the cfe-commits mailing list