Thread View: borland.public.jbuilder.java.api
2 messages
2 total messages
Started by Dan Tran
Wed, 09 Oct 2002 17:01
When will a user thread dies? gabage collectable
Author: Dan Tran
Date: Wed, 09 Oct 2002 17:01
Date: Wed, 09 Oct 2002 17:01
11 lines
1144 bytes
1144 bytes
Hi, My understanding is when a main thread dies, all of its daemon threads will die as well. What about user thread? when will it die? after it run() method completes? Advice is greatly appreciated -Dan
Re: When will a user thread dies? gabage collectable
Author: John McGrath TeamB
Date: Wed, 16 Oct 2002 07:58
Date: Wed, 16 Oct 2002 07:58
24 lines
1662 bytes
1662 bytes
On Wed, 9 Oct 2002 10:01:59 -0700, Dan Tran wrote:
> My understanding is when a main thread dies, all of its daemon
> threads will die as well.
The JVM stops when there are only daemon threads left running in the
JVM. If by "main" thread you mean the thread that runs the main()
method, that does not have much to do with it. If there are other
non-daemon threads running when that thread stops, daemon threads
will continue running.
> What about user thread? when will it die? after it run() method
> completes?
Yes.
--
Regards,
John McGrath [TeamB]
---------------------------------------------------
Before sending me e-mail, please read:
http://www.JPMcGrath.net/newsgroups/e-mail.html
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads