8202252: (aio) Closed AsynchronousSocketChannel keeps completion handler alive
Brian Burkhalter
brian.burkhalter at oracle.com
Wed Jun 27 18:12:57 UTC 2018
On Jun 27, 2018, at 8:25 AM, Alan Bateman <Alan.Bateman at oracle.com> wrote:
> The change to set connectHandler to null needs more checking, I can't immediately say if this if right.
The only lines in the (new) code where connectHandler is used are:
implConnect()
340: set connectHandler instance variable from parameter passed in
finishConnect()
275: assign a local variable ‘handler’ from connectHandler instance variable
276: set connectHandler to null
> The test does this:
>
> System.gc();
> assertNull(ref.get());
>
> The more usual check is something like this:
>
> while (ref.get() != null) { Thread.sleep(20); }
>
> so that the test waits until the reference is cleared.
Updated: http://cr.openjdk.java.net/~bpb/8202252/webrev.01/
Thanks,
Brian
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.openjdk.java.net/pipermail/nio-dev/attachments/20180627/06c62e79/attachment.html>
More information about the nio-dev
mailing list