This revision was automatically updated to reflect the committed changes.
Closed by commit rL303634: [clangd] Replaced WorkerRequest with
std::function... (authored by ibiryukov).
Changed prior to commit:
https://reviews.llvm.org/D33415?vs=99883&id=99900#toc
Repository:
rL LLVM
https://revi
krasimir accepted this revision.
krasimir added a comment.
This revision is now accepted and ready to land.
Looks good.
https://reviews.llvm.org/D33415
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/lis
ilya-biryukov added inline comments.
Comment at: clangd/ClangdServer.cpp:102
} // unlock Mutex
+ RequestCV.notify_one();
Worker.join();
krasimir wrote:
> Why did this get out?
"The notifying thread does not need to hold the lock on the same mutex as the
o
ilya-biryukov marked 2 inline comments as done.
ilya-biryukov added inline comments.
Comment at: clangd/ClangdServer.cpp:85
+Request = std::move(RequestQueue.front());
+RequestQueue.pop_front();
} // unlock Mutex
krasimir wrote:
> Why are w
ilya-biryukov updated this revision to Diff 99883.
ilya-biryukov marked 2 inline comments as done.
ilya-biryukov added a comment.
Added more comments to addToEnd/addToFront, added explicit flush instead of
relying on raw_ostream's destructor to do it implicitly.
https://reviews.llvm.org/D33415
krasimir added inline comments.
Comment at: clangd/ClangdUnitStore.h:56
+ template
+ void runOnExistingUnit(PathRef File, Func Action) {
+std::lock_guard Lock(Mutex);
krasimir wrote:
> Maybe make it less generic and put the implementation in the source fil
krasimir added inline comments.
Comment at: clangd/ClangdServer.cpp:85
+Request = std::move(RequestQueue.front());
+RequestQueue.pop_front();
} // unlock Mutex
Why are we taking it from the front and not from the back? Maybe at least add a