kadircet added inline comments.

================
Comment at: clang-tools-extra/clangd/TUScheduler.cpp:511
   llvm::Optional<std::shared_ptr<const PreambleData>> LatestPreamble;
-  std::queue<Request> PreambleRequests; /* GUARDED_BY(Mutex) */
+  std::deque<Request> PreambleRequests; /* GUARDED_BY(Mutex) */
   /// Signaled whenever LatestPreamble changes state or there's a new
----------------
TIL: queue doesn't allow iteration :shrug:


================
Comment at: clang-tools-extra/clangd/TUScheduler.cpp:1054
     Requests.push_back({std::move(Task), std::string(Name), 
steady_clock::now(),
-                        std::move(Ctx), Update, Invalidation,
-                        std::move(Invalidate)});
+                        std::move(Ctx), std::move(QueueCtx), Update,
+                        Invalidation, std::move(Invalidate)});
----------------
what if we just pushed the span here and kept it alive in the queue? it is 
move-able at the moment.

our tracing contract seem to be saying beginSpan/endSpan calls would always 
form a proper stack, i am not sure about its importance to the jsontracer, but 
I don't think rest of our tracers cares (and i think it would be nice for that 
trace to actually span the whole time in queue).


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D96027

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

Reply via email to