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

Add SuspendibleThreadSetLeaver and make SuspendibleThreadSet::joint()/leave() private

    Details

    • Type: Enhancement
    • Status: Resolved
    • Priority: P4
    • Resolution: Fixed
    • Affects Version/s: 9
    • Fix Version/s: 9
    • Component/s: hotspot
    • Labels:
      None
    • Subcomponent:
      gc
    • Resolved In Build:
      b66
    • CPU:
      generic
    • OS:
      generic

      Backports

        Description

        We currently have two use patterns of the SuspendibleThreadSet. In most cases a SuspendibleThreadSetJoiner is placed on the stack. This is nice because ensures that you don't forget to leave the set. The other cases use direct calls to SuspendibleThreadSet::join() and SuspendibleThreadSet::leave(), and this is typically used when there's a need to temporary leave the set in the middle of some block of logic. I propose that we add a SuspendibleThreadSetLeaver to accompany the SuspendibleThreadSetJoiner and make it the only way to join/leave the set.

          Attachments

            Issue Links

              Activity

                People

                • Assignee:
                  pliden Per Liden
                  Reporter:
                  pliden Per Liden
                • Votes:
                  0 Vote for this issue
                  Watchers:
                  2 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved: