From 758564655310f7843c3307383de090b4d5ccd96a Mon Sep 17 00:00:00 2001 From: Peter Veentjer Date: Thu, 24 Oct 2024 15:20:49 +0300 Subject: [PATCH] NoOpIdleStrategy doc improvement. --- .../java/org/agrona/concurrent/NoOpIdleStrategy.java | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/agrona/src/main/java/org/agrona/concurrent/NoOpIdleStrategy.java b/agrona/src/main/java/org/agrona/concurrent/NoOpIdleStrategy.java index f8d1dd88..13e7e4ce 100644 --- a/agrona/src/main/java/org/agrona/concurrent/NoOpIdleStrategy.java +++ b/agrona/src/main/java/org/agrona/concurrent/NoOpIdleStrategy.java @@ -18,6 +18,15 @@ /** * Low-latency idle strategy to be employed in loops that do significant work on each iteration such that any * work in the idle strategy would be wasteful. + *

+ * The NoOpIdleStrategy should be used with care: + *

    + *
  1. It could increase power consumption.
  2. + *
  3. The increased power consumption could lead to thermal throttling causing an overall performance drop.
  4. + *
  5. It could consume resources that otherwise would be used by the hyper-sibling.
  6. + *
  7. It could lead to a memory order violation at the end of the loop causing a pipeline reset.
  8. + *
+ * The {@link BusySpinIdleStrategy} might be a better alternative in some scenario's. */ public final class NoOpIdleStrategy implements IdleStrategy {