Question about AsynchronousByteChannel.read()
Alan Bateman
Alan.Bateman at oracle.com
Tue Jul 19 07:44:26 PDT 2011
cowwoc wrote:
>
> ... How so? If we queue incoming requests, only one operation runs
> at a time. Completion handlers are guaranteed to return in the order
> in which they were submitted. Am I missing something?
If by "return" you mean execute then there isn't any guarantee. Even
today if you initiate two read operations in quick succession, and if
you specify two different completion handlers that just print a trace
message, then it's possible that they the trace messages will not be
printed in the order that you expect.
-Alan.
More information about the nio-dev
mailing list