Article View: borland.public.jbuilder.java.api
Article #772Re: When will a user thread dies? gabage collectable
From: 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
Technical Details
Message-ID:
<MPG.1816e641f90fab3798ba93@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-03!sn-xit-01!sn-xit-04!supernews.com!easynet-quince!easynet.net!colt.net!newspeer.clara.net!news.clara.net!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mailReferences:
<3da4620d$1@newsgroups.borland.com>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 1089d0,f0779c2d36b65727 X-Google-Attributes: gid1089d0,public X-Google-ArrivalTime: 2002-10-16 01:16:03 PST From: John McGrath [TeamB] <ng-b@JPMcGrath.net> Newsgroups: borland.public.jbuilder.java.api Subject: Re: When will a user thread dies? gabage collectable Date: Wed, 16 Oct 2002 03:58:45 -0400 Message-ID: <MPG.1816e641f90fab3798ba93@newsgroups.borland.com> References: <3da4620d$1@newsgroups.borland.com> X-Newsreader: MicroPlanet Gravity v2.60 NNTP-Posting-Host: 151.197.228.139 X-Trace: newsgroups.borland.com 1034755124 151.197.228.139 (16 Oct 2002 00:58:44 -0700) Lines: 24 X-Authenticated-User: jpmcgrath Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-03!sn-xit-01!sn-xit-04!supernews.com!easynet-quince!easynet.net!colt.net!newspeer.clara.net!news.clara.net!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail