This revision was automatically updated to reflect the committed changes.
Closed by commit rL373924: [clangd] Fix raciness in code completion tests
(authored by kadircet, committed by ).
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.
Changed prior to commit:
https://revi
ilya-biryukov accepted this revision.
ilya-biryukov marked an inline comment as done.
ilya-biryukov added a comment.
This revision is now accepted and ready to land.
LGTM
Comment at: clang-tools-extra/clangd/unittests/CodeCompleteTests.cpp:1141
+ReceivedRequestCV.wait(Lock,
kadircet added inline comments.
Comment at: clang-tools-extra/clangd/unittests/CodeCompleteTests.cpp:1141
+ReceivedRequestCV.wait(Lock,
+ [this, Num] { return NumRequestsReceived == Num; });
+NumRequestsReceived = 0;
ilya-biryuko
kadircet updated this revision to Diff 222890.
kadircet marked 5 inline comments as done.
kadircet added a comment.
- Address comments
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D68273/new/
https://reviews.llvm.org/D68273
Files:
clang-tools-ex
ilya-biryukov added a comment.
It just hit me that we should probably just wait for the async request to
finish before returning from completion.
We might be doing this to reduce latency a little, but I don't recall us
measuring that this provides a significant performance win.
Would that work?
kadircet updated this revision to Diff 222618.
kadircet added a comment.
- As discussed offline, making `consumeRequests` take an argument for how many
requests to receive before returning.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D68273/new/
ilya-biryukov added a comment.
This is still racy if there were > 1 request. I wonder if there a better way to
address this?
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D68273/new/
https://reviews.llvm.org/D68273
__
kadircet created this revision.
kadircet added reviewers: sammccall, ilya-biryukov.
Herald added subscribers: cfe-commits, usaxena95, arphaman, jkorous, MaskRay.
Herald added a project: clang.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D68273
Files:
clang-tools-extra/clangd