[PATCH] D80784: [clangd][NFC] Explode ReceivedPreamble into a CV

Sam McCall via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri May 29 07:34:29 PDT 2020


sammccall added inline comments.


================
Comment at: clang-tools-extra/clangd/TUScheduler.cpp:661
+    std::unique_lock<std::mutex> Lock(Mutex);
+    RequestsCV.wait(Lock, [this] {
+      // Block until we reiceve a preamble request, unless a preamble already
----------------
Does LatestPreamble signal RequestsCV or just PreambleCV?

Seems like it might be less error-prone to have just one CV, signalled when preamble requests are scheduled, latest preamble becomes available, and on shutdown. The spurious wakeups shouldn't be a real problem, right?


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D80784





More information about the cfe-commits mailing list