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

Add utility for spin wait with fallback to yield/sleep

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Fixed
    • Icon: P4 P4
    • 11
    • None
    • hotspot
    • None
    • b10
    • generic
    • generic

      There are several places in HotSpot where there is a wait loop that uses SpinPause, with a fallback to either yielding or sleeping if the wait goes on for a while. There are at least a couple more such places presently in development. It would be useful to have a utility class for that functionality, so there is only one copy of the code for doing this. One benefit of centralization would be to allow future work on interesting wait policies to affect all the uses without needing to rewrite them.

            kbarrett Kim Barrett
            kbarrett Kim Barrett
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: