[PATCH] D29886: [clangd] Wire up ASTUnit and publish diagnostics with it.

Manuel Klimek via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Feb 15 06:48:08 PST 2017


klimek added inline comments.


================
Comment at: clangd/ASTManager.h:67
+  /// Setting Done to true will make the worker thread terminate.
+  std::atomic<bool> Done;
+};
----------------
bkramer wrote:
> klimek wrote:
> > arphaman wrote:
> > > It looks like `Done` is always accessed in a scope where `RequestLock` is locked, so `atomic` doesn't seem needed here.
> > Yea, after only having read this header, it looks like we might want to pull out a Request as an abstraction.
> Wrapped all the guarded variables in a struct.
For me that actually makes it worse (sorry): I now read "Request.Done" and think the request is done :)


https://reviews.llvm.org/D29886





More information about the cfe-commits mailing list