kadircet added inline comments.

================
Comment at: clangd/Cancellation.h:71
+
+class TaskHandle {
+public:
----------------
ilya-biryukov wrote:
> I wonder if we should make `TaskHandle` move-only?
> 
> The reasoning is that is can be easily used from multiple threads (since it's 
> used by code dealing with async tasks anyway) and copying it concurrently is 
> a data race.
> On the other hand, calling `cancel()` is perfectly thread-safe and shouldn't 
> cause any problems.
As similar to above mentioned case copying doesn't introduce any data races.


Repository:
  rCTE Clang Tools Extra

https://reviews.llvm.org/D50502



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

Reply via email to