Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-4528152

(thread spec) Do unstarted daemon threads prevent VM termination?

XMLWordPrintable

    • generic
    • generic



      Name: skR10005 Date: 11/16/2001


      It seems the merlin API spec for class Thread is incomplete.
      It reads:
        "The Java Virtual Machine continues to execute threads until either
        of the following occurs:
           The exit method of class Runtime has been called and the security
             manager has permitted the exit operation to take place.
           All threads that are not daemon threads have died, either by
             returning from the call to the run method or by throwing
             an exception that propagates beyond the run method."
      But there is no mention about non-daemon threads which are not started.
      They have not died as described in spec but java terminates its execution.
      Does this contradict to the spec?
      I think this issue should be clarified in the spec.

      ======================================================================

            alanb Alan Bateman
            serjsunw Serj Serj (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: