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

Augment Workgang to run task with a given number of threads

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Fixed
    • Icon: P4 P4
    • 9
    • 9
    • hotspot
    • gc
    • b120

      In many cases more direct control about the number of threads for a given task is required. The current way of doing so is quite involved, requiring a few lines of code where every part is important.

      Like:

      size_t new_active_threads = ...
      size_t old_active_threads = gang->num_active_threads();
      gang->set_active_threads(new_active_threads);
      gang->run_task(...);
      gang->set_active_threads(old_active_threads);

      The proposal is to add a method that allows you to set the number of threads to use for the given task directly.

            tschatzl Thomas Schatzl
            tschatzl Thomas Schatzl
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: