On Thu, 5 Nov 2026 16:17:10 GMT, Daniel Fuchs <[email protected]> wrote:
>> src/java.net.http/share/classes/jdk/internal/net/http/Stream.java line 1547:
>>
>>> 1545: void connectionClosing(Throwable cause) {
>>> 1546: boolean runScheduler = false;
>>> 1547: inputQLock.lock();
>>
>> You may consider documenting the rationale for holding the `inputQLock` here.
>
> I double checked whether this was still needed: yes
The inputQLock is needed to synchronize with the scheduler loop: if the
scheduler loop pulls the last DATA frame that contains the END_STREAM,
connectionClosing() may observe an empty inputQ and call cancelImpl() before
the loop calls onComplete().
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/33697#discussion_r4483043339