On Fri, 8 Dec 2023 06:30:21 GMT, Alan Bateman <al...@openjdk.org> wrote:

>> src/java.base/share/classes/jdk/internal/event/SelectionEvent.java line 38:
>> 
>>> 36: public class SelectionEvent extends Event {
>>> 37: 
>>> 38:     public int count;
>> 
>> It could also be interesting to provide the `timeout` that was given to the 
>> selection operation.
>
>> It could also be interesting to provide the `timeout` that was given to the 
>> selection operation.
> 
> I've tried to work through issues, esp. around selector spinning, and being 
> able to distinguish select from selectNow is important for all of them, so 
> yes, the timeout is needed or else no emit when the timeout == 0 as that's 
> the case you have to filter out when troubleshooting.

I've added filtering of selectNow(), and an event is emitted if there is a 
timeout independent of the threshold.  The duration should roughly equal the 
timout in that case.  I added more test cases to cover those two changes.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/16710#discussion_r1425744977

Reply via email to