[concurrency-interest] Suggestion: .hardGet() for atomic variables
raphfrk at gmail.com
Thu Jan 19 15:31:05 EST 2012
On Thu, Jan 19, 2012 at 8:28 PM, Ruslan Cheremin <cheremin at gmail.com> wrote:
> Actually you still can implement your "hard get" (which is actually
> seems like LoadLoadBarrier + vload) with non-numeric types as
> atomicRef.compareAndSet(current, current) -- it is exactly the code to
> which getAndAdd(0) will be actually transformed (AFAIK).
Thanks, can "current" be any non-null reference?
More information about the Concurrency-interest