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

thread dies?

 
Robert Kennedy
Ranch Hand
Posts: 63
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
if the thread which creates a thread is terminated are the threads which the terminated thread created also terminated?

for example an applet creates a thread and then the user navigates away from the page causing the applet destry method to execute.
 
Edward Harned
Ranch Hand
Posts: 291
Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If you set daemon to true when you create the thread -- when there are no other threads alive, then the JVM dies killing all daemon threads.

When not daemon, then the thread continues until you kill the JVM.
 
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
  • Quote
  • Report post to moderator
Originally posted by Robert Kennedy:
if the thread which creates a thread is terminated are the threads which the terminated thread created also terminated?


No
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!