Augment Workgang to run task with a given number of threads

XMLWordPrintable

    • Type: Enhancement
    • Resolution: Fixed
    • Priority: P4
    • 9
    • Affects Version/s: 9
    • Component/s: 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.

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

              Created:
              Updated:
              Resolved: