Results 1 to 2 of 2

Thread: what is meant by Daemon thread? quick question [resolved]

  1. #1

    Thread Starter
    Hyperactive Member CaptainPinko's Avatar
    Join Date
    Jan 2001
    Location
    London, Ontario, Canada
    Posts
    332

    Question what is meant by Daemon thread? quick question [resolved]

    i was reading some stuff on threadgroup and they are talking about setting a Daemon level thread? what is meant by Daemon level? are those system level threads?
    Last edited by CaptainPinko; Oct 22nd, 2001 at 04:30 PM.
    "There are only two things that are infinite. The universe and human stupidity... and the universe I'm not sure about." - Einstein

    If you are programming in Java use www.NetBeans.org

  2. #2
    Dazed Member
    Join Date
    Oct 1999
    Location
    Ridgefield Park, NJ
    Posts
    3,418
    The runtime enviroment distinguishes between user threads and daemon threads. As long as the user thread is alive, the execution does not termanate. A daemon thread is acutually at the mercy of the runtime system, it is stoped if there are no more user threads running. When a standalone application is run a user thread is automatically created to execute the main() method. The thread is called the main thread. If no other thread are spawned the program termanates when the main() method finishes executing. You can change the threads status by using setDaemon(boolean), but note! this must be done before the thread is started.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width