<HTML><BODY><div>Documentation for VarHandle.compareAndExchangeRelease says that memory effects of reading value of this variable is the same as the effects for plain read.</div><div>Does that mean that returned value is not usable in a CAS loop if there is no other memory effects in-between iterations? Because in theory it is possible for plain read to return the same value on every iteration of this loop.</div><div>And if so - wouldn’t it be more useful to have a versions of CAS operation with getOpaque/setRelease and setOpaque/getAcquire effects?</div></BODY></HTML>