8199611: (se) Minor selector implementation clean-up
Langer, Christoph
christoph.langer at sap.com
Wed Mar 14 15:38:31 UTC 2018
Hi Alan,
this looks like some nice cleanups and improvements.
I didn't test with it but going through the changes I can't find anything to my dislike.
Best regards
Christoph
> -----Original Message-----
> From: nio-dev [mailto:nio-dev-bounces at openjdk.java.net] On Behalf Of
> Alan Bateman
> Sent: Mittwoch, 14. März 2018 15:02
> To: nio-dev at openjdk.java.net
> Subject: 8199611: (se) Minor selector implementation clean-up
>
>
> I have a number of patches for the Selector implementations, this
> include a few random cleanups that I would prefer to separate out.
>
> The cleanup patch in the following webrev:
> http://cr.openjdk.java.net/~alanb/8199611/webrev/index.html
>
> The only two interesting changes are:
>
> 1. SelectionKey is specified to be thread safe but the readyOps is read
> without synchronization, this is why readyOps changed to volatile.
>
> 2. The epoll based Selector iterated over the polled file descriptors
> twice, once to check for wakeup/interrupt, the second to update the
> selected keys. The first iteration can be dropped as the
> wakeup/interrupt can be detected when updating the keys.
>
> All the existing tests pass with these changes on all platforms.
>
> -Alan
More information about the nio-dev
mailing list