krasimir added a comment.

Great!



================
Comment at: clangd/ClangdServer.h:131
+
 /// Handles running WorkerRequests of ClangdServer on a separate threads.
 /// Currently runs only one worker thread.
----------------
typo: "on separate threads"


================
Comment at: clangd/ClangdServer.h:176
   std::mutex Mutex;
   /// We run some tasks on a separate threads(parsing, CppFile cleanup).
   /// This thread looks into RequestQueue to find requests to handle and
----------------
typo: "on separate threads"


================
Comment at: clangd/tool/ClangdMain.cpp:24
 
-static llvm::cl::opt<bool>
-    RunSynchronously("run-synchronously",
-                     llvm::cl::desc("Parse on main thread"),
-                     llvm::cl::init(false), llvm::cl::Hidden);
+static unsigned getDefaultThreadsCount() {
+  unsigned HardwareConcurrency = std::thread::hardware_concurrency();
----------------
Extract this somewhere when it can be reused both by this and in 
`clangd/ClangdServer.cpp:90`.


================
Comment at: clangd/tool/ClangdMain.cpp:69
+  SchedulingOptions SchedOpts =
+      !RunSynchronously ? SchedulingOptions::RunOnWorkerThreads(ThreadsCount)
+                        : SchedulingOptions::RunOnCallingThread();
----------------
Consider inverting this condition.


https://reviews.llvm.org/D36261



_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to