Package org.agrona.hints
Class ThreadHints
- java.lang.Object
-
- org.agrona.hints.ThreadHints
-
@Deprecated public final class ThreadHints extends java.lang.Object
Deprecated.This class is deprecated. UseThread.onSpinWait()
directly.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 Modifier and Type Field Description static java.lang.String
DISABLE_ON_SPIN_WAIT_PROP_NAME
Deprecated.Set this system property to true to disableonSpinWait()
.private static boolean
ON_SPIN_WAIT_ENABLED
Deprecated.
-
Constructor Summary
Constructors Modifier Constructor Description private
ThreadHints()
Deprecated.
-
Method Summary
All Methods Static Methods Concrete Methods Deprecated Methods Modifier and Type Method Description static void
onSpinWait()
Deprecated.Indicates that the caller is momentarily unable to progress, until the occurrence of one or more actions on the part of other activities.
-
-
-
Field Detail
-
DISABLE_ON_SPIN_WAIT_PROP_NAME
public static final java.lang.String DISABLE_ON_SPIN_WAIT_PROP_NAME
Deprecated.Set this system property to true to disableonSpinWait()
.- See Also:
- Constant Field Values
-
ON_SPIN_WAIT_ENABLED
private static final boolean ON_SPIN_WAIT_ENABLED
Deprecated.
-
-
Method Detail
-
onSpinWait
public static void onSpinWait()
Deprecated.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.
-
-