RFR: 8253478: (se) epoll Selector should use eventfd for wakeup instead of pipe [v6]

Brian Burkhalter bpb at openjdk.java.net
Wed Jan 20 18:03:20 UTC 2021


On Wed, 20 Jan 2021 15:38:10 GMT, Alan Bateman <alanb at openjdk.org> wrote:

>> Brian Burkhalter has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   8253478: clean up comment in epoll selector
>
> src/java.base/linux/classes/sun/nio/ch/EventFD.java line 60:
> 
>> 58:     }
>> 59: 
>> 60:     static native int eventfd0() throws IOException;
> 
> I assume the native methods should be private.

So changed.

> src/java.base/linux/classes/sun/nio/ch/EventFD.java line 41:
> 
>> 39:     EventFD() throws IOException {
>> 40:         efd = eventfd0();
>> 41:         IOUtil.configureBlocking(IOUtil.newFD(efd), false);
> 
> If there is just one no-arg constructor then I think it should create the eventfd with the default settings, meaning blocking mode. A second constructor that takes a boolean blocking parameter would be okay too.

Above suggestions addressed.

-------------

PR: https://git.openjdk.java.net/jdk/pull/2082


More information about the nio-dev mailing list