labath added a comment.

In D120892#3357780 <https://reviews.llvm.org/D120892#3357780>, @JDevlieghere 
wrote:

> Might a `llvm::once_flag` + `llvm::call_once` be simpler?

Simpler... maybe.. depends how you look at it.

But, synchronization-wise, it is overkill. once_flag ensures that none of the 
racing threads can make progress until the action terminates. Most of the time, 
that's exactly what we want, but here the correct operation of the other 
threads is not affected by this action, so it is sufficient that the warning 
gets printed "eventually".


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D120892

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

Reply via email to