(thread) ThreadGroup.activeCount() doesn't always reach 0 after stop() called

XMLWordPrintable

    • Type: Bug
    • Resolution: Not an Issue
    • Priority: P4
    • None
    • Affects Version/s: 1.2.0
    • Component/s: core-libs
    • None
    • generic
    • generic

      I recently wrote sun.awt.AppContext.dispose() which, among other things, calls
      ThreadGroup.stop() and waits for ThreadGroup.activeCount() to return 0 before
      calling ThreadGroup.destroy().

      The problem is that ThreadGroup.activeCount() never goes down to 0 when
      appletviewer calls my sun.awt.AppContext.dispose() method. activeCount()
      returns 1, but ThreadGroup.enumerate() returns 0, so I can't even determine
      the offending Thread.

      In ThreadGroup.java, activeCount() returns nthreads, but enumerate() counts
      only those Threads for which isAlive() returns true. Shouldn't these work
      the same?

            Assignee:
            Pete Soper (Inactive)
            Reporter:
            Fred Ecks (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: