kadircet added a comment.

In D90747#2379406 <https://reviews.llvm.org/D90747#2379406>, @sammccall wrote:

> AsyncTaskRunner is definitely threadsafe, but const doesn't exactly mean 
> threadsafe...

Right, I was also trying to punt on the idea of "writes are synchronized" 
rather than promising threadsafety here.

> This might be OK or maybe we should put `mutable` at the callsite - can you 
> show the real example?

Oops, sorry forgot to update the stack for this one. The usage is in 
https://reviews.llvm.org/D90750, line 86 of ProjectAware.cpp specifically.
We definitely can make the AsyncTaskRunner mutable there too, but I would feel 
bad about mutating a "mutable" member without holding a lock in general, hence 
this change.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D90747

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

Reply via email to