[prev in list] [next in list] [prev in thread] [next in thread]
List: openjdk-nio-discuss
Subject: AsynchronousByteCharChannel and Timeouts
From: cowwoc () bbs ! darktech ! org (Gili)
Date: 2009-07-31 22:02:40
Message-ID: 1249077760637-3365317.post () n2 ! nabble ! com
[Download RAW message or body]
Alan Bateman wrote:
>
> Another suggestion is to create a class that decorates a given
> AsynchronousByteChannel, extending it with methods for timed operations.
> You should be able to combine any AsynchronousByteChannel with the timer
> support in j.u.c and create a nice solution.
>
> -Alan.
>
I don't understand. Are you talking about adding functionality similar to
Future.get(long timeout) on top of an existing byte channel? I was talking
about the different between:
read(ByteBuffer dst, A attachment, CompletionHandler<Integer,? super A>
handler);
and
void read(ByteBuffer dst, long timeout, TimeUnit unit, A attachment,
CompletionHandler<Integer, ? super A> handler);
As far as I know you can't implement the latter in terms of the former
because you need to pass the timeout values to the underlying OS. What did
you mean?
Gili
--
View this message in context: \
http://n2.nabble.com/AsynchronousByteCharChannel-and-Timeouts-tp3363004p3365317.html \
Sent from the nio-discuss mailing list archive at Nabble.com.
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic