fun compareAndSet(expect: Boolean, update: Boolean): Boolean
Atomically sets the value to the given updated value if the current value
== the expected value.
expect- the expected value
update- the new value
true if successful. False return indicates that the actual value was not equal to the expected value.