RFR: 8343394: Make MemorySessionImpl.state a stable field [v5]

Quan Anh Mai qamai at openjdk.org
Tue Nov 5 15:36:33 UTC 2024


On Tue, 5 Nov 2024 15:29:22 GMT, Per Minborg <pminborg at openjdk.org> wrote:

>> Quan Anh Mai has updated the pull request incrementally with two additional commits since the last revision:
>> 
>>  - copyright year
>>  - address reviews
>
> In `SharedSession`, would it not be necessary to override `isClosable()` so it would be using `volatile` semantics to read the `state` field rather than relying on plain reads?

@minborg No because a `SharedSession` can only transit from `OPEN` to `CLOSED`, both states will return `true` on `isCloseable()`.

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

PR Comment: https://git.openjdk.org/jdk/pull/21810#issuecomment-2457491919


More information about the core-libs-dev mailing list