RFR: 8297778: Modernize and improve module jdk.sctp [v5]

Sergey Tsypanov stsypanov at openjdk.org
Thu Dec 1 13:09:18 UTC 2022


On Thu, 1 Dec 2022 12:05:26 GMT, Per Minborg <pminborg at openjdk.org> wrote:

> receiverThread and senderThread are declared volatile but are always accessed (r/w) whilst synchronising on the stateLock.

I think it's better to keep them as is. What I'm saying is that you don't need explicit assignment of default value for a volatile field as it costs us, and without this assignment the default value will be there by the spec.

P.S. I guess you forgot about `private volatile long thread = 0;` in `SctpServerChannelImpl` and unnecessary fully-qualified names in `SctpStandardSocketOptions`

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

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


More information about the net-dev mailing list