About flattening a nullable j.l.Long
Remi Forax
forax at univ-mlv.fr
Thu Nov 6 13:02:08 UTC 2025
Hello,
as far as i remember, the problem is that you can resurrect a value,
for example with a Long
Thread1
a.x = new Long(12);
a.x = null;
IO.println(a.x); //12
Thread2
IO.println(a.x); // null
a.x = new Long(77); // descheduled in between writing the maker and writing the long
The thread1 can see the Long(12) to be resurrected, something that is not possible with references.
regards,
Rémi
> From: "Quân Anh Mai" <anhmdq at gmail.com>
> To: "David Alayachew" <davidalayachew at gmail.com>
> Cc: "valhalla-dev" <valhalla-dev at openjdk.org>
> Sent: Thursday, November 6, 2025 3:52:41 AM
> Subject: Re: About flattening a nullable j.l.Long
> Ah yes, my bad, it is [ https://github.com/openjdk/valhalla/pull/1720 |
> https://github.com/openjdk/valhalla/pull/1720 ]
> On Thu, 6 Nov 2025 at 07:26, David Alayachew < [ mailto:davidalayachew at gmail.com
> | davidalayachew at gmail.com ] > wrote:
>> Just a heads up, your [1] is a dead link. Can you try to put the url in again?
>> On Wed, Nov 5, 2025, 2:06 PM Quân Anh Mai < [ mailto:anhmdq at gmail.com |
>> anhmdq at gmail.com ] > wrote:
>>> Hi,
>>> Currently, I'm having a PR that allows flattening of a nullable value class with
>>> a 64-bit payload [1]. Dan Smith told me that some ideas along these lines were
>>> discussed a few years ago, and the consensus was that it was a dead end. May I
>>> ask what the concerns were, and whether they are still relevant now?
>>> Thanks a lot,
>>> Quan Anh
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.openjdk.org/pipermail/valhalla-dev/attachments/20251106/4ab060bf/attachment-0001.htm>
More information about the valhalla-dev
mailing list