var

if

// okay, now let verify that this is indeed the case, in thread safe manner,

// this way, most of the time we don't need volatile reads, and other sync operations

// in the code ensure we don't have too stale a view on the data (beside, stale view have

// to mean a smaller number, which we then verify).

ref

while

// if it changed, we don't care, it is just another max, and another thread probably

// set it for us, so we only retry if this is still smaller

ref