[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Bug classpath/28619] New: NIO is incomplete
From: |
csm at gnu dot org |
Subject: |
[Bug classpath/28619] New: NIO is incomplete |
Date: |
6 Aug 2006 08:33:18 -0000 |
Our NIO implementation -- especially socket channels -- is currently
incomplete; the implementation we have relies on plain, blocking-IO sockets to
implement channel operations (and, it does this by relying on socket timeouts
to "emulate" nonblocking behavior). This solution won't work for all cases.
Specific issues with the current implementation include nonblocking connects
not working, and neither does detecting EOF on a nonblocking read.
I don't think it's possible, or at least, wise, to try to use PlainSocketImpl
to implement nonblocking sockets; that code (aside from suffering from the
target-native brain damage) is far too reliant on the blocking model, and it
looks difficult to teach it to handle nonblocking IO too. The current
implementation is, at best, barely adequate.
The best solution, that I can think of, is to put the maybe-blocking operations
(read, write, connect and accept) exclusively in the SocketChannelImpl class,
to put the socket option manipulation in the PlainSocketImpl class, and to make
blocking sockets just call to a private SocketChannel for IO operations.
--
Summary: NIO is incomplete
Product: classpath
Version: 0.92
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: classpath
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: csm at gnu dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=28619
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Bug classpath/28619] New: NIO is incomplete,
csm at gnu dot org <=