C# 클래스 Disruptor.YieldingWaitStrategy

Yielding strategy that uses a Thread.yield() for EventProcessor s waiting on a barrier after an initially spinning. This strategy is a good compromise between performance and CPU resource without incurring significant latency spikes.
상속: IWaitStrategy
파일 보기 프로젝트 열기: disruptor-net/Disruptor-net

공개 메소드들

메소드 설명
SignalAllWhenBlocking ( ) : void

Signal those IEventProcessor waiting that the cursor has advanced.

WaitFor ( long sequence, Sequence cursor, ISequence dependentSequence, ISequenceBarrier barrier ) : long

Wait for the given sequence to be available

This strategy is a good compromise between performance and CPU resource without incurring significant latency spikes.

비공개 메소드들

메소드 설명
ApplyWaitMethod ( ISequenceBarrier barrier, int counter ) : int

메소드 상세

SignalAllWhenBlocking() 공개 메소드

Signal those IEventProcessor waiting that the cursor has advanced.
public SignalAllWhenBlocking ( ) : void
리턴 void

WaitFor() 공개 메소드

Wait for the given sequence to be available

This strategy is a good compromise between performance and CPU resource without incurring significant latency spikes.

public WaitFor ( long sequence, Sequence cursor, ISequence dependentSequence, ISequenceBarrier barrier ) : long
sequence long sequence to be waited on.
cursor Sequence Ring buffer cursor on which to wait.
dependentSequence ISequence dependents further back the chain that must advance first
barrier ISequenceBarrier barrier the is waiting on.
리턴 long