my dog learned polymorphism
The moose likes Programmer Certification (SCJP/OCPJP) and the fly likes daemon thread & user thread Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Java Interview Guide this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Certification » Programmer Certification (SCJP/OCPJP)
Bookmark "daemon thread & user thread" Watch "daemon thread & user thread" New topic

daemon thread & user thread

Gokulakrishnan Raghuraman

Joined: Nov 27, 2002
Posts: 10
Is the garbage collection thread a non-daemon thread ? and can the garbage collection thread outlive the last user thread ?
Jessica Sant

Joined: Oct 17, 2001
Posts: 4313

ok.... lets look at this objectively.
* by definition the JVM won't shut down til all user (non-daemon) threads finish executing.
so.... if the garbage collector is a user thread -- how would the JVM ever shut down?

- Jess
Blog:KnitClimbJava | Twitter: jsant | Ravelry: wingedsheep
I agree. Here's the link:
subject: daemon thread & user thread
It's not a secret anymore!