[PATCH] D36261: [clangd] Use multiple working threads in clangd.

Ilya Biryukov via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Aug 3 05:22:01 PDT 2017


ilya-biryukov added inline comments.


================
Comment at: clangd/ClangdServer.h:121-122
+public:
+  /// Returns the number of threads to use when shouldRunsynchronously() is
+  /// false. Must not be called if shouldRunsynchronously() is true.
+  unsigned getThreadsCount();
----------------
klimek wrote:
> Why not: 1 -> run synchronously, > 1, run in parallel?
Currently 1 means: start 1 worker thread to run async operations (that thread is separate from the main thread).
This makes sense for clangd, as if you do that, you still get code completion that doesn't wait for diagnostics to finish.
On the other hand, it's useful to have `-run-synchronously` for some tests.


https://reviews.llvm.org/D36261





More information about the cfe-commits mailing list