RFR: 8273000: Remove WeakReference-based class initialisation barrier implementation
David Holmes
dholmes at openjdk.java.net
Thu Aug 26 02:51:24 UTC 2021
On Wed, 25 Aug 2021 22:05:24 GMT, Vladimir Ivanov <vlivanov at openjdk.org> wrote:
> The key observation is that `Unsafe::ensureClassInitialized()` does not block the initializing thread.
I'm unclear exactly what that statement is meant to indicate. The thread actually running "clinit" does not block due to the initialization process, but will block if the class initialization code blocks. If the class is not initialized and you are racing with another thread doing the initialization then you may block until that initialization is complete.
-------------
PR: https://git.openjdk.java.net/jdk/pull/5258
More information about the core-libs-dev
mailing list