8146298: (dc spec) connect and disconnect methods should specify that they may block

Alan Bateman Alan.Bateman at oracle.com
Thu Oct 31 18:34:46 UTC 2019


On 31/10/2019 18:26, Brian Burkhalter wrote:
> :
>
> Specifically it was intended to match this sentence from the 
> SocketChannel class description:
>
> "The connect and finishConnect methods are mutually synchronized 
> against each other, and an attempt to initiate a read or write 
> operation while an invocation of one of these methods is in progress 
> will block until that invocation is complete."
>
"in progress" makes sense here because it can take significant time to 
establish connection or wait for a connection to be established. With a 
DatagramChannel, the connect/disconnect is just setting or dissolving an 
address association so I'm concerned the proposed addition to the class 
description is giving the wrong impression. So my view is that we don't 
need this part of the change.

-Alan
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.openjdk.java.net/pipermail/nio-dev/attachments/20191031/de561622/attachment.html>


More information about the nio-dev mailing list