Win a copy of Practical SVG this week in the HTML/CSS/JavaScript forum!
    Bookmark Topic Watch Topic
  • New Topic

If JVM exits if threads running are all Daemon threads,then what makes the Daemon threads(continued)

 
John McDowell
Greenhorn
Posts: 26
  • Mark post as helpful
  • send pies
  • Report post to moderator
What makes the Daemon threads continue to run? Isn't JVM responsible for running anything and everything in Java.If it exits, then how will the running daemon threads continue to run.This question was posted after I read the API docs for java.lang.Threads->setDaemon() method?
 
Henry Wong
author
Sheriff
Posts: 22542
109
C++ Chrome Eclipse IDE Firefox Browser Java jQuery Linux VI Editor Windows
  • Mark post as helpful
  • send pies
  • Report post to moderator
John McDowell wrote:What makes the Daemon threads continue to run? Isn't JVM responsible for running anything and everything in Java.If it exits, then how will the running daemon threads continue to run.This question was posted after I read the API docs for java.lang.Threads->setDaemon() method?



When the JVM exists, then everything related to it are gone. This includes the daemon threads.

Henry
 
John McDowell
Greenhorn
Posts: 26
  • Mark post as helpful
  • send pies
  • Report post to moderator
Henry Wong wrote:
John McDowell wrote:What makes the Daemon threads continue to run? Isn't JVM responsible for running anything and everything in Java.If it exits, then how will the running daemon threads continue to run.This question was posted after I read the API docs for java.lang.Threads->setDaemon() method?



When the JVM exists, then everything related to it are gone. This includes the daemon threads.

Henry


Hi Henry, I was talking in this context
http://www.coderanch.com/t/635669/threads/java/give-headfirst-version-daemon-daemon
 
Henry Wong
author
Sheriff
Posts: 22542
109
C++ Chrome Eclipse IDE Firefox Browser Java jQuery Linux VI Editor Windows
  • Mark post as helpful
  • send pies
  • Report post to moderator
John McDowell wrote:
Hi Henry, I was talking in this context
http://www.coderanch.com/t/635669/threads/java/give-headfirst-version-daemon-daemon



Okay, I am going to lock this topic -- as your two topics are basically now at the same question.

Henry
    Bookmark Topic Watch Topic
  • New Topic
Boost this thread!