[PATCH] D96856: [clangd] Narrow and document a loophole in blockUntilIdle

Kadir Cetinkaya via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Feb 18 02:19:04 PST 2021


kadircet added inline comments.


================
Comment at: clang-tools-extra/clangd/ClangdServer.cpp:893
+  for (llvm::Optional<double> Timeout :
+       {TimeoutSeconds, TimeoutSeconds, llvm::Optional<double>(0)}) {
+    if (!CDB.blockUntilIdle(timeoutSeconds(Timeout)))
----------------
this is extending the Deadline in theory, e.g. if user requested idleness in 10 seconds, this can now wait for up to 20 seconds. but this was possible in the previous case too, e.g. CDB could block for 10 seconds, and then bgindex would block for another 10 seconds, and mentioned this is only for tests, so should be fine (but might be worth mentioning in the comments.)


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D96856



More information about the cfe-commits mailing list