RFR: 8273000: Remove WeakReference-based class initialisation barrier implementation [v2]

David Holmes dholmes at openjdk.java.net
Thu Sep 2 05:11:35 UTC 2021


On Wed, 1 Sep 2021 18:28:30 GMT, Paul Sandoz <psandoz at openjdk.org> wrote:

>> Vladimir Ivanov has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   Improve comments
>
> src/java.base/share/classes/jdk/internal/misc/Unsafe.java line 1152:
> 
>> 1150:      * The call returns when either class {@code c} is fully initialized or
>> 1151:      * class {@code c} is being initialized and the call is performed from
>> 1152:      * the initializing thread.
> 
> Suggestion:
> 
>      * The call returns when either class {@code c} is fully initialized or
>      * class {@code c} is being initialized and the call is performed from
>      * the initializing thread. In the latter case a subsequent call to
>      * {@link #shouldBeInitialized}, from the calling thread of this call,
>      * will return {@code true}.

Aren't "the calling thread of this call" and "the initializing thread" the same thread in the latter case?

-------------

PR: https://git.openjdk.java.net/jdk/pull/5258


More information about the core-libs-dev mailing list