Alexander Kleymenov wrote: >> Paulex Yang wrote: >> Any better solution is highly appreicated, Thanks! > > I can propose another way: begin() method creates new thread listening > for Thread.curentThread().isInterrupted() status and if it becomes > true, it just calls close() method, triggers the state of the channel > as ClosedByInterruptException, and exits. The end() method just stops > this additional thread (if it was not stopped after the blocked Thread > had been interrupted) and, if necessary, throws appropriate exception. > > No VMI changes are needed, but there will be additional thread between > begin() - end() calls. This thread will sleep between isInterrupted() > checks > and will not take much computational resources.
I disagree, creating an additional thread per socket besides the blocked thread will be prohibitively limit IO scalability. Regards, Tim -- Tim Ellison ([EMAIL PROTECTED]) IBM Java technology centre, UK. --------------------------------------------------------------------- Terms of use : http://incubator.apache.org/harmony/mailing.html To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]