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

Brian Burkhalter brian.burkhalter at oracle.com
Thu Oct 31 18:26:34 UTC 2019


> On Oct 31, 2019, at 6:49 AM, Alan Bateman <Alan.Bateman at oracle.com> wrote:
> 
> On 31/10/2019 00:42, Brian Burkhalter wrote:
>> For the issue [1] to improve the specification of DatagramChannel please review this doc change [2]. Hopefully I’ve captured the behavior accurately. Note the class-level doc change to match SocketChannel.
>> 
> I don't think the change to the class description is needed because connect/disconnect aren't doing I/O, they are just setting up or dissolving an address association.

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."

> The sentence in connect/disconnect to describe that it will blocking until outstanding I/O operations complete is okay but the version in connect has "however" in the middle of the sentence, I think you can drop that so that it is consistent with disconnect.

Unless I am mistaken both had “however” which also matches the specifications of receive() and send(), but I agree it’s better to remove it.

> I assume we should  move the statement about discarding datagrams to an implNote.

Done [*].

Thanks,

Brian

[*] http://cr.openjdk.java.net/~bpb/8146298/webrev.01/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.openjdk.java.net/pipermail/nio-dev/attachments/20191031/7ba645f7/attachment.html>


More information about the nio-dev mailing list