8202252: (aio) Closed AsynchronousSocketChannel keeps completion handler alive
Alan.Bateman at oracle.com
Tue Jul 3 07:33:37 UTC 2018
On 02/07/2018 19:55, Brian Burkhalter wrote:
> I changed it to use a ReferenceQueue per Roger’s suggestion:
It's testing the right thing now and the switch to using a reference
queue looks okay.
The bug may not have existed on Windows but I don't think we have other
tests for this type of thing so my preference would be to drop the
@requires os.family != "Windows".
One thing to double check in the test is whether it closes all the
connections. In testConnect it doesn't close the client connection and
also it seems to forget to accept and close the other end too. It looks
to be correct in testRead and testWrite but the line breaks make it hard
to read - maybe you could have slightly longer lines here to make this
easier to read.
More information about the nio-dev