JDK 9 RFR of 8175209: Account for race condition in java/nio/channels/AsynchronousSocketChannel/Basic.java

Alan Bateman Alan.Bateman at oracle.com
Mon Mar 6 16:11:41 UTC 2017


On 03/03/2017 21:57, Brian Burkhalter wrote:

> Here is a patch changed per my interpretation of Hamlin’s suggestion:
>
> http://cr.openjdk.java.net/~bpb/8175209/webrev.02/ 
> <http://cr.openjdk.java.net/%7Ebpb/8175209/webrev.02/>
>
> Also “new Random()" was replaced with RandomFactory.getRandom().
>
The "give time for the socket buffer to fill up" changes look okay but 
the "// attempt concurrent writes"  from L357 looks a bit ugly and 
should not be necessary. Can we leave the latter out of the changes and 
only come back to it if there are further stability issues?

-Alan


More information about the nio-dev mailing list