gnu.java.nio.SelectorManager always puts all of keys() into selectedKeys()?

Adam Megacz adam@megacz.com
Mon May 28 23:45:00 GMT 2007


Forgive me if I'm confused here...
In gnu/java/nio/SelectorManager.java on line 227, VMSelector.select()
is invoked. It appears that unless that method throws an exception,
the following while loop (line 228) will always add every element in
keys() into selectedKeys() -- I see no control statements between the
top of the loop and line 305, where the key is added if it isn't
already in the selected set.
Is this the desired behavior?
Hopefully I'm just confused here. But if this is actually a bug, let
me know and I'll post a patch.
Context: I was trying out Jetty under GCJ, and the NIO-based server
doesn't cope well with the situation where Selector.select() returns 0
*and* adds elements to the selected set (the return value is supposed
to be the number of elements added to the selected key set).
 - a
-- 
PGP/GPG: 5C9F F366 C9CF 2145 E770 B1B8 EFB1 462D A146 C380


More information about the Java mailing list

AltStyle によって変換されたページ (->オリジナル) /