Class ThreadHints


  • @Deprecated
    public final class ThreadHints
    extends java.lang.Object
    Deprecated.
    Use Thread.onSpinWait() directly. This class previously existed to accommodate Java versions which do not have Thread.onSpinWait().
    This class captures possible hints that may be used by some runtimes to improve code performance. It is intended to capture hinting behaviours that are implemented in or anticipated to be spec'ed under the Thread class in some Java SE versions, but missing in prior versions.
    • Method Summary

      All Methods Static Methods Concrete Methods Deprecated Methods 
      Modifier and Type Method Description
      static void onSpinWait()
      Deprecated.
      Use Thread.onSpinWait() directly.
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • onSpinWait

        @Deprecated
        public static void onSpinWait()
        Deprecated.
        Use Thread.onSpinWait() directly. This method previously existed to accommodate Java versions which do not have Thread.onSpinWait().
        Indicates that the caller is momentarily unable to progress, until the occurrence of one or more actions on the part of other activities. By invoking this method within each iteration of a spin-wait loop construct, the calling thread indicates to the runtime that it is busy-waiting. The runtime may take action to improve the performance of invoking spin-wait loop constructions.