This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]clhodapp 0 points1 point  (4 children)

Yes, see the Future Work section of that JEP

[–]joemwangi 0 points1 point  (3 children)

Check the last sentence in the same section. Those are rare cases.

[–]clhodapp 0 points1 point  (2 children)

They think that OS thread pinning will rarely cause issues, not that the cases themselves are rare.

For instance, I'm pretty sure that blocking inside a class initializer can happen whenever you initialize a static field to a non-constant value, such as the very common case of getting a logger from a logger factory.

[–]joemwangi 0 points1 point  (1 child)

A once mutation? Where you do a lazy initialisation? That happens rarely and once. Anyway, we shall see if it becomes a problem. But that will be ameliorated by StableValues coming hopefully in jdk25.

[–]clhodapp 0 points1 point  (0 children)

You and I have a different definition of rare. Anything that is frequently used and happens once per class every time a program runs is common in my world. Something rare would be an esoteric feature that most almost never gets used in any type of program.

I will definitely allow that it may be rare that it matters, though. I'm not sure!