[concurrency-interest] Should I avoid compareAndSet with value-based classes?

Aleksey Shipilev shade at redhat.com
Tue Jul 11 13:48:36 EDT 2017

On 07/11/2017 07:30 PM, Aleksey Shipilev wrote:
> How will Valhalla deal with these problems, we shall see. My bet is on
> value-type-specific comparisons (which should catch CAS in its wake), plus
> boxing where the references are needed (which would capitalize on what we
> learned to love about Java's primitives).

Ah, quoting http://cr.openjdk.java.net/~jrose/values/values-0.html:

"Many of the above restrictions correspond to the restrictions on so-called
value-based classes. In fact, it seems likely that the boxed form of every value
type will be a value-based class."

So this seems to imply that identity-wise:
  "value type" < "value-based class" < "ordinary class".


-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: OpenPGP digital signature
URL: <http://cs.oswego.edu/pipermail/concurrency-interest/attachments/20170711/8967eb71/attachment.sig>

More information about the Concurrency-interest mailing list