On Tue, 25 Nov 2025 09:35:10 GMT, Volkan Yazici <[email protected]> wrote:

>> Daniel Fuchs has updated the pull request with a new target base due to a 
>> merge or a rebase. The pull request now contains eight commits:
>> 
>>  - Merge branch 'master' into ConnectionCloseLock-8372198
>>  - Merge master
>>  - 8372198: Avoid closing PlainHttpConnection while holding a lock
>>  - Merge branch 'master' into SelectorManagerVT-8372159
>>  - Copyright years
>>  - Review feedback on test
>>  - Revert changes to SelectorManager::shutdown
>>  - 8372159: HttpClient SelectorManager thread could be a VirtualThread
>
> src/java.net.http/share/classes/jdk/internal/net/http/PlainHttpConnection.java
>  line 321:
> 
>> 319:         }
>> 320:         try {
>> 321:             tube.signalClosed(errorRef.get());
> 
> Shouldn't `errorRef.get()` be invoked in the synchronized block to ensure 
> that the obtained `Throwable` is due to just executed lines above, and not 
> overridden by a subsequent action?

errorRef is always set with compareAndSet(null, throwable) - so can't be 
changed once set.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/28430#discussion_r2559448340

Reply via email to