AsynchronousByteCharChannel and Timeouts
Alan Bateman
Alan.Bateman at Sun.COM
Fri Aug 7 12:51:24 PDT 2009
cowwoc wrote:
> :
> Any idea on how to do this?
How about using WaitForMultipleEvents to multiplex the handle to the
serial port and a handle to an event that is set when the timer expires.
That should work for the Future usage too as you can set the event when
the cancel method is invoked. It would tie up one of the threads in your
thread pool for the duration of the I/O operation, but I assume that
this wouldn't be a problem as the number of serial ports it likely to be
small (I would guess).
-Alan.
More information about the nio-discuss
mailing list