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

No easy way to get all threads in a thread group

    Details

    • Type: Enhancement
    • Status: Closed
    • Priority: P5
    • Resolution: Duplicate
    • Affects Version/s: 1.2.0
    • Fix Version/s: None
    • Component/s: core-libs
    • Labels:
    • Subcomponent:
    • CPU:
      x86
    • OS:
      windows_nt

      Description



      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)
      ======================================================================

        Attachments

          Issue Links

            Activity

              People

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

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Imported:
                  Indexed: