compareExchange(x, y, z)
The values of x and y are compared. If they agree, then true is returned and the value of z is stored in x. Otherwise, false is returned. This operation occurs atomically and is thread safe.
|
|
|
|
|
The object compareExchange is a method function.