public void Publish(long sequence) { SetAvailableBufferValue(CalculateIndex(sequence), CalculateAvailabilityFlag(sequence)); if (_isBlockingWaitStrategy) { _waitStrategy.SignalAllWhenBlocking(); } }
public void Publish(long sequence) { SetAvailable(sequence); if (_isBlockingWaitStrategy) { _waitStrategy.SignalAllWhenBlocking(); } }
public void Publish(long sequence) { _cursor.SetValue(sequence); if (_isBlockingWaitStrategy) { _waitStrategy.SignalAllWhenBlocking(); } }
public void run() { try { barrier.SignalAndWait(); if (0 != sleepTime) { Thread.Sleep(sleepTime); } sequence.IncrementAndGet(); waitStrategy.SignalAllWhenBlocking(); } catch (Exception e) { Console.WriteLine(e.ToString()); } }
public void Run() { try { _barrier.Signal(); _barrier.Wait(); if (0 != _sleepTime) { Thread.Sleep(_sleepTime); } Sequence.IncrementAndGet(); _waitStrategy.SignalAllWhenBlocking(); } catch (Exception e) { Console.WriteLine(e); } }
public void Alert() { _alerted = true; _waitStrategy.SignalAllWhenBlocking(); }
public void SignalAllWhenBlocking() { _fallbackStrategy.SignalAllWhenBlocking(); }
public void CancelProcessing() { _cancellationTokenSource.Cancel(); _waitStrategy.SignalAllWhenBlocking(); }
/// <summary> /// Force the publication of a cursor sequence. /// /// Only use this method when forcing a sequence and you are sure only one publisher exists. /// This will cause the cursor to advance to this sequence. /// </summary> /// <param name="sequence">sequence which is to be forced for publication.</param> public void ForcePublish(long sequence) { _cursor.LazySet(sequence); _waitStrategy.SignalAllWhenBlocking(); }