Thx Trustin.

JVM is:

Java HotSpot(TM) 64-Bit Server VM (build 1.6.0-rc-b103, mixed mode)
Has anybody else experienced similar behavior?

I'll look into it further.


Trustin Lee wrote:
> 
> 2007-02-27 (화), 18:24 -0800, afa654321 쓰시길:
>> Hi All,
>> 
>> I have written a simple client test application which does *not*
>> terminate
>> after executing the following:
>> 
>> session.close(); 
>> System.exit(0);
>> 
>> I see, after the exit statement is executed, the following runnable
>> thread:
>> 
>> Thread [PooledByteBufferExpirer-0] (Running)
>> Thread [SocketConnector-1] (Running)
>> 
>> "Thread [SocketConnector-1] (Running)" dies after a few seconds.
>> 
>> Why doesn't the "Thread [PooledByteBufferExpirer-0] (Running)" terminate?
>> and subsequently the program?
> 
> Well, it's weird!
> 
> It might be because it takes longer to deallocate direct buffers.
> PooledByteBufferExpirer is a daemon thread, so it should exit by itself
> when there's no other non-daemon threads.  Moreover, System.exit() is
> supposed to stop all threads including both daemon and non-daemon
> threads.  So, I suspect JVM.
> 
> Trustin
> -- 
> what we call human nature is actually human habit
> --
> http://gleamynode.net/
> --
> PGP Key ID: 0x0255ECA6
> 
>  
> 

-- 
View this message in context: 
http://www.nabble.com/session.close%28%29-tf3306314.html#a9341365
Sent from the mina dev mailing list archive at Nabble.com.

Reply via email to