peter-lawrey/Java-Thread-Affinity

Proprietary API

Closed this issue · 1 comments

The compiler/maven kindly informs me:

[WARNING] /.../peter-lawrey-Java-Thread-Affinity-2eb1744/src/main/java/vanilla/java/busywaiting/impl/JavaBusyWaiting.java:19: warning: sun.misc.Unsafe is Sun proprietary API and may be removed in a future release
[WARNING] import sun.misc.Unsafe;
[WARNING] ^
[WARNING] /.../peter-lawrey-Java-Thread-Affinity-2eb1744/src/main/java/vanilla/java/busywaiting/impl/JavaBusyWaiting.java:30: warning: sun.misc.Unsafe is Sun proprietary API and may be removed in a future release
[WARNING] static final Unsafe UNSAFE;
[WARNING] ^

In my experience, such API vanishes already in Java 7 (if for no other reason than that stuff won't be named after Sun anymore) so you should avoid using it.

It is still there is Java 7. I know its discouraged. I have heard a rumour there may be plans to remove it from Java 8.

I don't know if this code is used by any body. You don't need it unless you want to control your busy waiting.