On Wed, 17 Feb 2021 20:01:17 GMT, Andrey Turbanov 
<github.com+741251+turban...@openjdk.org> wrote:

>> Jaikiran Pai has updated the pull request incrementally with three 
>> additional commits since the last revision:
>> 
>>  - Incorporate the review suggestion to run the test multiple times to 
>> improve the chances of reproducing any potential deadlock
>>  - Incorporate the review suggestion to use @modules instead of 
>> --add-exports option while launching the test
>>  - Fix copyright message on test
>
> src/java.base/share/classes/sun/net/ext/ExtendedSocketOptions.java line 171:
> 
>> 169: 
>> 170:     public static ExtendedSocketOptions getInstance() {
>> 171:         if (instance != null) {
> 
> May be it's worth to avoid reading `volatile` field twice?

Hello @turbanoff, do you mean why read it twice - once here and once inside the 
`synchronized` block?

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

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

Reply via email to