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

Attachment: signature.asc
Description: This is a digitally signed message part

Reply via email to