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

Clean up SuspendibleThreadSet::_suspend_all

    XMLWordPrintable

Details

    • Enhancement
    • Resolution: Fixed
    • P4
    • 21
    • 21
    • hotspot
    • gc
    • b08

    Description

      The SuspendibleThreadSet::_suspend_all variable is read and set concurrently, yet relies only on volatiles in accessors. They should use Atomic instead. Also, the _suspend_all getter is called suspend_all(), but since this function doesn't suspend anything, the name looks really confusing where it is, and there is an alias should_yield() that just calls suspend_all(), and better explains what the code does. This CR aims to remove suspend_all() and have a single getter, being should_yield (which reads better everywhere it is used), and make sure the accessors do use Atomic.

      Attachments

        Issue Links

          Activity

            People

              eosterlund Erik Ă–sterlund
              eosterlund Erik Ă–sterlund
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: