8199791: (se) More Selector cleanup
Alan Bateman
Alan.Bateman at oracle.com
Tue Mar 20 13:47:53 UTC 2018
This is another batch of cleanup to the Selector implementations.
A significant part of the cleanup is changing the epoll and kqueue based
Selector implementations to use the EPoll and KQueue support classes.
This eliminate their wrapper classes and several native methods. The
result is much smaller implementations. The queuing of changes to the
interest set has also been re-worked to avoid needing cancellation
needing to kill all pending updates. A few of the Selector
implementations had a native method to write a byte to one end of the
pipe used for the wakeup mechanism. This has been changed to use
IOUtil.write1 instead. Interrupting timed polls (as in EINTR, not Thread
interrupt) wasn't handled correctly in some of the implementations so
that has been re-worked.
The webrev with the changes is here:
http://cr.openjdk.java.net/~alanb/8199791/webrev/index.html
I have several other changes for this area but I'd prefer to do the
changes in small batches to avoid changing too much in one go. Small
patches are easier to review too of course (and in this case, there is
more deletion than new code).
I have run all tests on all platforms several times.
-Alan
More information about the nio-dev
mailing list