JDK 9 RFR of 8172547: (se) Selector.select(Long.MAX_VALUE) fires repeatedly
Roger.Riggs at Oracle.com
Fri Jan 13 22:23:35 UTC 2017
- 35: for consistency use the '_' in both constants
- 40: you may want isTimedOut and theException to be volatile since it
is written and read by different threads
Comment on the existing code: line 77.
Using Thread.join(SLEEP_MILLIES) would continue quicker in the case of
an exception or for the timeout=0 case.
It would knock some time off the clock time for the test.
On 1/13/2017 12:15 PM, Brian Burkhalter wrote:
> Please review at your convenience.
> Issue: https://bugs.openjdk.java.net/browse/JDK-8172547
> Patch: http://cr.openjdk.java.net/~bpb/8172547/webrev.00/
> The 64-bit signed integer timeout was converted to a Windows native timeval struct without taking account that the members of this struct are 32-bit signed integers, hence timeouts greater than or equal to 2147483648000L milliseconds could end up being converted to a negative value.
More information about the nio-dev