C# Class Disruptor.SleepingWaitStrategy

Sleeping strategy that uses a SpinWait while the IEventProcessors are waiting on a barrier. This strategy is a good compromise between performance and CPU resource. Latency spikes can occur after quiet periods.
Inheritance: IWaitStrategy
Exibir arquivo Open project: disruptor-net/Disruptor-net Class Usage Examples

Public Methods

Method Description
SignalAllWhenBlocking ( ) : void

IWaitStrategy.SignalAllWhenBlocking

SleepingWaitStrategy ( int retries = _defaultRetries ) : System.Threading
WaitFor ( long sequence, Sequence cursor, ISequence dependentSequence, ISequenceBarrier barrier ) : long

IWaitStrategy.WaitFor

Private Methods

Method Description
ApplyWaitMethod ( ISequenceBarrier barrier, int counter ) : int

Method Details

SignalAllWhenBlocking() public method

IWaitStrategy.SignalAllWhenBlocking
public SignalAllWhenBlocking ( ) : void
return void

SleepingWaitStrategy() public method

public SleepingWaitStrategy ( int retries = _defaultRetries ) : System.Threading
retries int
return System.Threading

WaitFor() public method

IWaitStrategy.WaitFor
public WaitFor ( long sequence, Sequence cursor, ISequence dependentSequence, ISequenceBarrier barrier ) : long
sequence long
cursor Sequence
dependentSequence ISequence
barrier ISequenceBarrier
return long