thank for you reply,i look for some api just like VarHandle, which i can replace Unsafe.objectFildOffset without requires jdk.unsupported . any good idea?
Gil Tene <[email protected]> 于2019年6月18日周二 下午11:43写道: > Out of curiosity: What do you use Unsafe.objectFieldOffset for that > VarHandle is lacking functionality for? > > It is useful to gather use cases not covered by VarHandle so that we can > propose additional capabilities there (preparing for a world with no Unsafe > in it). Can you share an example of code? > > As to your question: I assume it is Unsafe as a whole you are having > issues with, and not just Unsafe.objectFieldOffset, is that correct? You > can find examples of how to use Unsafe in a post-java-8 world e.g. here: > http://gregluck.com/blog/archives/2017/03/using-sun-misc-unsafe-in-java-9/ > > On Tuesday, June 18, 2019 at 5:48:14 AM UTC-7, xiaobai andrew wrote: >> >> i usr Unsafe.objectFieldOffset in jdk 8 ,but when i want to update jdk to >> 11, the idea compile error , it cannot found the symbol Unsafe. >> i have try to find VarHandle api,but it did not >> support Unsafe.objectFieldOffset >> > -- > You received this message because you are subscribed to the Google Groups > "mechanical-sympathy" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > To view this discussion on the web, visit > https://groups.google.com/d/msgid/mechanical-sympathy/fd3d12a2-5f1d-4795-9e58-28723b8f02d7%40googlegroups.com > <https://groups.google.com/d/msgid/mechanical-sympathy/fd3d12a2-5f1d-4795-9e58-28723b8f02d7%40googlegroups.com?utm_medium=email&utm_source=footer> > . > For more options, visit https://groups.google.com/d/optout. > -- You received this message because you are subscribed to the Google Groups "mechanical-sympathy" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web, visit https://groups.google.com/d/msgid/mechanical-sympathy/CANA_ZGxaTMk43FzhciC9qCKC3CM8zqmarFU3w7SC3EaW_eWRKQ%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.
