jQuery in Action, 2nd edition*
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 Android Security Essentials Live Lessons this week in the Android 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
It is sorta covered in the JavaRanch Style Guide.
subject: daemon thread & user thread
Similar Threads
Daemon Threads
Query about Daemon thread.
Daemon threads
Garbage collection