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

Let possibly_parallel_threads_do cover the same threads as threads_do

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Fixed
    • Icon: P4 P4
    • 21
    • 13
    • hotspot
    • b08

      Currently we have Threads::possibly_parallel_threads_do(), which operates on all the Java threads and the VM thread, but ignores other non-Java threads. However, there are some places that want parallel iteration over all threads, which use explicit iteration and explicit use of the claim_threads_do mechanism.

      It would be better to have a function similar to possibly_parallel_threads_do that operates on all threads.

      There is a naming issue though. Perhaps possibly_parallel_oops_do should be the all-threads variant, and the restricted version should be possibly_parallel_java_threads_and_vm_thread_do, being consistent with the naming of the serial iterators.

      Alternatively investigate whether it is possible to just have possibly_parallel_threads_do cover the same threads as threads_do for consistency.

            tschatzl Thomas Schatzl
            kbarrett Kim Barrett
            Votes:
            0 Vote for this issue
            Watchers:
            7 Start watching this issue

              Created:
              Updated:
              Resolved: