MCPcopy Create free account
hub / github.com/Abc-Arbitrage/Disruptor-cpp / waitFor

Method waitFor

Disruptor/YieldingWaitStrategy.cpp:13–27  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

11{
12
13 std::int64_t YieldingWaitStrategy::waitFor(std::int64_t sequence,
14 Sequence& /*cursor*/,
15 ISequence& dependentSequence,
16 ISequenceBarrier& barrier)
17 {
18 std::int64_t availableSequence;
19 auto counter = m_spinTries;
20
21 while ((availableSequence = dependentSequence.value()) < sequence)
22 {
23 counter = applyWaitMethod(barrier, counter);
24 }
25
26 return availableSequence;
27 }
28
29 void YieldingWaitStrategy::signalAllWhenBlocking()
30 {

Callers 2

runMethod · 0.45
runMethod · 0.45

Calls 1

valueMethod · 0.45

Tested by

no test coverage detected