harmony-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Charles Lee <littlee1...@gmail.com>
Subject Re: Problems with NIO
Date Tue, 24 Feb 2009 07:18:42 GMT
Hi Niklas,
Thanks for your testing code. I have run it on the linux and reproduced the
error. After some investigation, I find something really confused me: when
poll in the NetworkInterfaceLinux.c line 300, we encounter a system
interrupt call. This is where the socket exception from.

Anybody has encountered this? or is there somewhere some code will interrupt
the thread?

By the way, I have read some code in the file: NioSocketAcceptor,
AbstractPollingIoAcceptor to see what is acctually doing when bind an
address, only to find that MINA first select the Selector then register the
Selector. That seems strange for me.

On Tue, Feb 24, 2009 at 4:21 AM, Niklas Gustavsson <niklas@protocol7.com>wrote:

> On Mon, Feb 23, 2009 at 9:57 AM, Niklas Gustavsson <niklas@protocol7.com>
> wrote:
> > Does running the MINA or FtpServer unit tests count as a simple
> > testcase? :-) If not, I'll attempt to see if I can trim it down to a
> > simple JUnit test case.
>
> Using the following code, this exception will be thrown every 10 run or so:
>            IoAcceptor acceptor = new NioSocketAcceptor();
>            acceptor.setHandler(new IoHandlerAdapter());
>            acceptor.bind();
>            acceptor.unbind();
>            acceptor.dispose();
>
> This requires MINA and SLF4J on the classpath.
>
> Let me know if I can be of any further help!
>
> /niklas
>



-- 
Yours sincerely,
Charles Lee

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message