RFR: 8354024: [JMH] Create ephemeral UnixDomainSocketAddress provider with thread-safe close semantics [v4]
Volkan Yazici
vyazici at openjdk.org
Mon May 12 19:08:11 UTC 2025
On Mon, 12 May 2025 15:25:54 GMT, Michael McMahon <michaelm at openjdk.org> wrote:
>> Volkan Yazici has updated the pull request incrementally with one additional commit since the last revision:
>>
>> Improve UDS file path obtain
>
> test/micro/org/openjdk/bench/java/net/SocketChannelConnectionSetup.java line 58:
>
>> 56:
>> 57: @Param({"INET", "UNIX"})
>> 58: private volatile String family;
>
> This version looks a lot simpler, which is good. This question applies regardless of your change but I'm wondering why the field `family` is volatile but the other fields such as `sscFilePath` are not? I guess if we are sure that the JMH configuration guarantees that the setup, teardown and test methods are all run by the same thread, then they don't need to be volatile. But, I'm not sure if that is the case..
Correct. Removed `volatile` from `family` too in d830ec8b3c9.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/24568#discussion_r2085284855
More information about the net-dev
mailing list