kadircet added inline comments.

================
Comment at: clangd/index/Background.cpp:202
     std::lock_guard<std::mutex> Lock(QueueMu);
-    Queue.push_back(std::move(T));
+    if (Priority == ThreadPriority::Low) {
+      Queue.push_back(Bind(
----------------
ilya-biryukov wrote:
> Since we might be interested in scheduling higher-priority tasks first anyway 
> (not in this patch, but still), maybe store a pair of `(Task, Priority)` in 
> the queue and call `setCurrentThreadPriority` when actually running the task?
I believe we can introduce that later on whenever we have more than 2 
priorities, currently we push to front for important tasks and back for the low 
priority ones. Do you think it is not enough?


Repository:
  rCTE Clang Tools Extra

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D55315/new/

https://reviews.llvm.org/D55315



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

Reply via email to