• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • Paul Clapham
  • Devaka Cooray
  • Bear Bibeault
Sheriffs:
  • Junilu Lacar
  • Knute Snortum
  • Liutauras Vilda
Saloon Keepers:
  • Ron McLeod
  • Stephan van Hulst
  • Tim Moores
  • Tim Holloway
  • Piet Souris
Bartenders:
  • salvin francis
  • Carey Brown
  • Frits Walraven

A demon Thread group ???

 
Greenhorn
Posts: 28
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
2)A demon Thread group
a)has only demon threads.
b)can have non demon threads.
c)does not exist after all non demon threads in the group have finished executing.
d)does not exist after all the threads in the group have finished executing.
Ans 2,4
What is a demon Thread Group ??
Demon Thread Group
 
Ranch Hand
Posts: 133
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Demon Thread Group - an evil, evil thread group.
You're probably talking about a Daemon thread group. This is just like a nondaemon thread group, except for this quip from the API, which I don't fully understand:

A daemon thread group is automatically destroyed when its last thread is stopped or its last thread group is destroyed.


Anyone care to elaborate? Thanks!
 
Ranch Hand
Posts: 3271
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Originally posted by Paul Villangca:
Anyone care to elaborate? Thanks!


That means, simply, that, given a daemon thread group, if all of the threads within the group terminate (for any reason), the entire group is destroyed. It doesn't really make a whole lot of sense to have a group of non-running daemon threads, anyway. :roll:
Corey
 
Talk sense to a fool and he calls you foolish. -Euripides A foolish tiny ad:
Two software engineers solve most of the world's problems in one K&R sized book
https://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton
    Bookmark Topic Watch Topic
  • New Topic