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

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

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Fixed
    • Icon: P4 P4
    • 9
    • 9
    • hotspot
    • None
    • gc
    • b66
    • generic
    • generic

        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.

              pliden Per Liden (Inactive)
              pliden Per Liden (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated:
                Resolved: