a0485c5a90
Add random failures to compare_exchange_weak In practice this is pretty useful for detecting bugs. This fails more frequently than realistic (~~50%~~ (now 80%, controlled by a flag) of the time). I couldn't find any existing code that tries to model this (tsan, cdschecker, etc all seem to have TODOs there). Relacy models it with a 25% or 50% failure chance depending on some settings. CC `@JCTyblaidd` who wrote the code this modifies initially, and seems interested in this subject.