https://github.com/labath commented:

Someone once told me: "Whatever problem you're trying to solve, if you're using 
atomics, now you've got two problems."

I can't say I've always followed that advice, but I do think that atomics are 
rarely the right solution to a problem. And I think this is a good example of 
that.

What you want is not to suppress *a* event (whatever it might be). You want to 
suppress a very specific event (that is supposed to be generated by the action 
you're about to perform). That means that something needs to ensure that the 
other thread reads this flag after you've generated the event. If that's true, 
then you already have a happens-before relationship and the atomic is not 
necessary. If it isn't (there is no happens-before), then the atomic will not 
help.

That said, why is ConnectRemote generating a stopped event in synchronous mode? 
Maybe that's the bug we should fix?

https://github.com/llvm/llvm-project/pull/137920
_______________________________________________
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

Reply via email to