Package deltix.util.io.idlestrat
Class BusySpinIdleStrategy
- java.lang.Object
-
- deltix.util.io.idlestrat.BusySpinIdleStrategy
-
- All Implemented Interfaces:
IdleStrategy
public class BusySpinIdleStrategy extends java.lang.Object implements IdleStrategy
Aggressively burns CPU cycles. Use only if you need to get lowest possible latency and can afford dedicated CPU core for each thread that uses this strategy.Try using
YieldingIdleStrategybefore tryingBusySpinIdleStrategy.
-
-
Constructor Summary
Constructors Constructor Description BusySpinIdleStrategy()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voididle()Idle action (sleep, wait, etc).voididle(int workCount)voidreset()Reset the internal state (after doing some work).
-
-
-
Method Detail
-
idle
public void idle(int workCount)
- Specified by:
idlein interfaceIdleStrategy- Parameters:
workCount- amount of work done in the last cycle. Value "0" means that no work as done and some data form an external source expected.
-
idle
public void idle()
Description copied from interface:IdleStrategyIdle action (sleep, wait, etc).- Specified by:
idlein interfaceIdleStrategy
-
reset
public void reset()
Description copied from interface:IdleStrategyReset the internal state (after doing some work).- Specified by:
resetin interfaceIdleStrategy
-
-