kadircet added a comment.

Seems a lot cleaner now, thanks!

Do you plan to have other changes like moving control to JSONRPCDispatcher and 
recording timings for analysis on this patch? If not maybe we can add some 
fixme's so that we won't forget. Also the somewhat "caching" of cancellation 
token from previous implementation might still be useful in future if we really 
face "crowded" contexts and frequent cancellation checks, so maybe keep some 
notes about it?



================
Comment at: clangd/Cancellation.h:29
+// 2. Library code that executes long-running work, and can exit early if the
+//   result is not needed.
 //
----------------
Maybe also mention propagating context into long-running work. runAsync does 
that implicitly and not sure if there will be other use cases that doesn't 
include it, but if there might be it would be nice to point it out as well.


================
Comment at: clangd/Cancellation.h:44
+//   (A real example may invoke the callback with an error on cancellation,
+//   the TaskCancelledError is provided for this purpose).
 //
----------------
s/TaskCancelledError/CancelledError


Repository:
  rCTE Clang Tools Extra

https://reviews.llvm.org/D51996



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

Reply via email to