Package com.lmax.disruptor.util
Class ThreadHints
java.lang.Object
com.lmax.disruptor.util.ThreadHints
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.-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic void
Indicates that the caller is momentarily unable to progress, until the occurrence of one or more actions on the part of other activities.
-
Field Details
-
ON_SPIN_WAIT_METHOD_HANDLE
-
-
Constructor Details
-
ThreadHints
private ThreadHints()
-
-
Method Details
-
onSpinWait
public static void 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.
-