request for review: 7184932: Remove the temporary Selector usage in the NIO socket adapters

Rob McKenna rob.mckenna at oracle.com
Thu Oct 4 09:14:05 PDT 2012


Ah yes, sorry. I sent this out late last night after fighting with some 
unrelated test issues. I forgot I hadn't sent the updated test to the 
list before. So for posterity:

- There were no changes to the implementation. It was all testcase.
- The original test was loosely modelled on 
java/nio/channels/AsynCloseAndInterrupt.java until you pointed me 
towards this more elegant solution.
- It was updated to also test the affected ServerSocket & DatagramSocket 
methods.

I've updated the webrev with your suggestions (incl STPE, which is 
nicer, I guess I'm just used to writing tests that need to be 1.4.2 
compatible) and posted it here:

http://cr.openjdk.java.net/~robm/7184932/webrev.04/

     -Rob


On 04/10/12 10:57, Alan Bateman wrote:
> On 04/10/2012 02:45, Rob McKenna wrote:
>> Cheers Alan,
>>
>> Latest changes are at:
>>
>> http://cr.openjdk.java.net/~robm/7184932/webrev.03/ 
>> <http://cr.openjdk.java.net/%7Erobm/7184932/webrev.03/>
>>
>>     -Rob
> There's no changes to the implementation since the last round (end 
> September), right?  My recollection is that the remaining discussion 
> point was the test case and I see you've completely revamped it in the 
> latest webrev.
>
> I think the test looks good. You could have used a STPE and schedule 
> the close or interrupt with a delay rather than having the task sleep 
> but what you have is okay.
>
> A really minor point but I'd rename dgListener and dgc to dc to be 
> consistent with the other tests. Also I think that listener, dc, and 
> port can be final.
>
> Otherwise thumbs up from me and great to have this clean-up in jdk8 as 
> it will reduce the resource usage for cases where applications have 
> lots of socket adapters doing timed operations.
>
> -Alan
>
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.openjdk.java.net/pipermail/nio-dev/attachments/20121004/3e9931da/attachment.html 


More information about the nio-dev mailing list