RFR: 8304065: HttpServer.stop should terminate immediately if no exchanges are in progress [v4]
Mark Sheppard
msheppar at openjdk.org
Fri May 23 09:10:53 UTC 2025
On Fri, 23 May 2025 08:54:42 GMT, Mikhail Yankelevich <myankelevich at openjdk.org> wrote:
>> src/jdk.httpserver/share/classes/sun/net/httpserver/ServerImpl.java line 227:
>>
>>> 225: }
>>> 226:
>>> 227: public final boolean isFinishing() {
>>
>> encapsulating the server state in a CountDownLatch is obfuscated semantics
>
> Yes, but this is an existing function and it is used in other classes. I didn't change the functionality
the internal state representation of the server could do with a rethink and overhaul, and representing part of that state in a synchronisation primitive obscures/obfuscates the server state's semantics. I don't think it's "clean code"
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/25333#discussion_r2104166994
More information about the net-dev
mailing list