This is the mail archive of the java@gcc.gnu.org mailing list for the Java project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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


On May 28, 2007, at 6:40 PM, David Daney wrote:

Adam Megacz wrote:
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.


I have not looked at the code, but the GCJ nio support is full of bugs and unimplemented methods, so it would not be at all surprising if it were a real bug.


If you have a test case that works under the RI, but fails under libgcj, then I would post the patch and try to get the test case into mauve.


There are divergences between Classpath and libgcj here, AFIAK. Classpath also has support for epoll or kqueue Selectors on Linux or Mac OS X (resp.), which hasn't been ported into libgcj yet.


Thanks.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]