RFR: 8266369: (se) Add wepoll based Selector [v2]

Alan Bateman alanb at openjdk.java.net
Wed May 5 10:01:51 UTC 2021


On Wed, 5 May 2021 09:40:23 GMT, Chris Hegarty <chegar at openjdk.org> wrote:

>> Alan Bateman has updated the pull request with a new target base due to a merge or a rebase. The incremental webrev excludes the unrelated changes brought in by the merge/rebase. The pull request contains six additional commits since the last revision:
>> 
>>  - Merge
>>  - Propagate exception from discardOOB, cleanup
>>  - Merge
>>  - Use 'to' instead of '(int) timeout
>>  - Move SelectorWakeup micro to channels directory
>>  - Initial commit
>
> src/java.base/share/classes/sun/nio/ch/Net.java line 685:
> 
>> 683:      * Read and discard urgent data (MSG_OOB) on the socket.
>> 684:      */
>> 685:     static native boolean discardOOB(FileDescriptor fd) throws IOException;
> 
> I see a native implementation of this method on Windows only, but it is in the shared `Net` class. This method is not called on non-Windows, but it it were there would be a problems ;-).  Was the intention to add other platform specific implementations, or to confine it to Windows only?

It often happens in this area that Net and IOUtil define methods that aren't implemented on all platforms. In this case, discardOOB is generally useful and we can add it on other platforms when needed. I didn't add it now because it would not be used or tested.

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

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


More information about the nio-dev mailing list