On Wed, 1 Sep 2021 18:28:30 GMT, Paul Sandoz <psan...@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