Re:Removal of Unsafe in Java 9 – A disaster in the making
by trb8 on Monday July 13, 2015 @12:33PM
(#9879159)
Yes. Also there are many "safe" operations on "unsafe". Such as memory fences.
[ Parent
| on HN ]
Re:Removal of Unsafe in Java 9 – A disaster in the making
by vardump on Monday July 13, 2015 @08:51PM
(#9882195)
Multithreading is somewhat unsafe in general. And so is ability to do most I/O, you might overwhelm the system.
Re:Removal of Unsafe in Java 9 – A disaster in the making
by trb8 on Monday July 13, 2015 @10:59PM
(#9882609)
Sure. Unsafe in terms of program correctness. By that measure, new Thread() is unsafe.
But that's not a reasonable definition of "unsafe". This could crash the JVM is a reasonable definition. And fences and ordered instructions cannot.