Re: RFR: 8278270: ServerSocket is not thread safe

2021-12-06 Thread Alan Bateman
On Mon, 6 Dec 2021 13:39:11 GMT, Florian Weimer wrote: > To what extent is `ServerSocket` required to be thread-safe? I don't think > it's part of the specification. A ServerSocket is required by the spec to be asynchronously closable, that is the motivation for the changes here. java.net.Soc

Re: RFR: 8278270: ServerSocket is not thread safe

2021-12-06 Thread Daniel Fuchs
On Sun, 5 Dec 2021 16:44:05 GMT, Alan Bateman wrote: > There are several thread safety issues in java.net.ServerSocket, issues that > go back to at least JDK 1.4. > > The issue of most concern is async close of a ServerSocket that is initially > created unbound and where close may be called at

Re: RFR: 8278270: ServerSocket is not thread safe

2021-12-06 Thread Florian Weimer
On Sun, 5 Dec 2021 16:44:05 GMT, Alan Bateman wrote: > There are several thread safety issues in java.net.ServerSocket, issues that > go back to at least JDK 1.4. > > The issue of most concern is async close of a ServerSocket that is initially > created unbound and where close may be called at

Re: RFR: 8278270: ServerSocket is not thread safe

2021-12-06 Thread Alan Bateman
On Mon, 6 Dec 2021 11:28:16 GMT, Aleksey Shipilev wrote: >> There are several thread safety issues in java.net.ServerSocket, issues that >> go back to at least JDK 1.4. >> >> The issue of most concern is async close of a ServerSocket that is initially >> created unbound and where close may be

Re: RFR: 8278270: ServerSocket is not thread safe

2021-12-06 Thread Aleksey Shipilev
On Mon, 6 Dec 2021 11:40:46 GMT, Alan Bateman wrote: >> src/java.base/share/classes/java/net/ServerSocket.java line 90: >> >>> 88: private volatile boolean created; // impl.create(boolean) called >>> 89: private volatile boolean bound; >>> 90: private volatile boolean closed; >> >

Re: RFR: 8278270: ServerSocket is not thread safe

2021-12-06 Thread Alan Bateman
On Mon, 6 Dec 2021 11:30:12 GMT, Aleksey Shipilev wrote: >> There are several thread safety issues in java.net.ServerSocket, issues that >> go back to at least JDK 1.4. >> >> The issue of most concern is async close of a ServerSocket that is initially >> created unbound and where close may be

Re: RFR: 8278270: ServerSocket is not thread safe

2021-12-06 Thread Alan Bateman
On Mon, 6 Dec 2021 11:29:20 GMT, Aleksey Shipilev wrote: >> There are several thread safety issues in java.net.ServerSocket, issues that >> go back to at least JDK 1.4. >> >> The issue of most concern is async close of a ServerSocket that is initially >> created unbound and where close may be

Re: RFR: 8278270: ServerSocket is not thread safe

2021-12-06 Thread Aleksey Shipilev
On Sun, 5 Dec 2021 16:44:05 GMT, Alan Bateman wrote: > There are several thread safety issues in java.net.ServerSocket, issues that > go back to at least JDK 1.4. > > The issue of most concern is async close of a ServerSocket that is initially > created unbound and where close may be called at

RFR: 8278270: ServerSocket is not thread safe

2021-12-05 Thread Alan Bateman
There are several thread safety issues in java.net.ServerSocket, issues that go back to at least JDK 1.4. The issue of most concern is async close of a ServerSocket that is initially created unbound and where close may be called at or around the time the underlying SocketImpl is created or the