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

No easy way to get all threads in a thread group

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Duplicate
    • Icon: P5 P5
    • None
    • 1.2.0
    • core-libs
    • x86
    • windows_nt



      Name: ccC48265 Date: 12/08/97


      The design of thread groups seems inadequate:

      The only way to get all the threads in a thread group is with activeCount
      and enumerate. But if the number of threads changes between the two method
      calls, there is no way to detect this; and if there is some way to combine
      the two actions into a single atomic action, it is not documented.

      Better to have a design similar to Collections, where enumerate is replaced
      by a (single, atomic) method that returns an array of threads.

      Also, it would be convenient to have a join method for thread groups, that
      joins with every thread in the group.

      (Review ID: 21520)
      ======================================================================

            jjb Josh Bloch
            ccresswesunw Claudette Cresswell (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: