Question about AsynchronousByteChannel.read() (original) (raw)

cowwoc cowwoc at bbs.darktech.org
Tue Jul 19 05:57:52 PDT 2011


Alan Bateman-2 wrote:

Yes, it depends on the channel type. With a channel to a stream oriented connection then it doesn't always make sense to have more than one outstanding I/O operations of a given type as they would complete in an undefined order (and with an operation such as write then it would easily "corrupt" the stream for example). However it does make sense for other channel types, for example AsynchronousFileChannel where there may be I/O operations to different parts of the file happening at the same thing. If you go back through the archives of this list then you should find some prior discussion on queuing of I/O operations that make be useful to you.

Couldn't steam-oriented channels simply queue incoming requests and handle them on a first-come first-serve basis?

Gili

-- View this message in context: http://nio-dev.3157472.n2.nabble.com/Question-about-AsynchronousByteChannel-read-tp6570959p6598698.html Sent from the nio-dev mailing list archive at Nabble.com.



More information about the nio-dev mailing list