On Wed, 30 Nov 2022 18:34:15 GMT, Per Minborg <[email protected]> wrote:

>> This PR proposes a variety of modernisations to the `jdk.sctp` module.
>> 
>> During the fix of https://bugs.openjdk.org/browse/JDK-8296024, several 
>> improvement areas were identified including: 
>> 
>> * Replacing duplicate code segments 
>> * Making certain fields final 
>> * Using enhanced switch 
>> * Using records 
>> * Fixing typos 
>> * Marking fields participating in serialisation with `@Serial` 
>> * Modernizing toString() implementations 
>> * Using pattern matching 
>> * Using diamond operators
>
> Per Minborg has updated the pull request incrementally with one additional 
> commit since the last revision:
> 
>   Minor updates

`receiverThread` and `senderThread` are declared `volatile` but are always 
accessed (r/w) whilst synchronising on the `stateLock`. So, this indicates that 
the the fields do not need to be `volatile` and could instead be used with 
normal memory semantics?

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

PR: https://git.openjdk.org/jdk/pull/11418

Reply via email to