public void AddState(ExecutionState toAdd) { // Don't remove state here even if its ExplicitBranchDepth is greater than what is allowed. // If we terminate it here this leads to very unintuitive behaviour because // it might be (and usually is) the case that toAdd is not currently being executed // by the Executor as so terminating a state that isn't being executed or about to be // Executed can be confusing. UnderlyingStateScheduler.AddState(toAdd); }
public void AddState(ExecutionState toAdd) { Debug.Assert(EscapingBlocks != null, "Escaping blocks not set"); var block = toAdd.GetCurrentBlock(); if (block != null && EscapingBlocks.Contains(block)) { // This state appears to be in a block that leaves a loop. LoopEscapingStates.Push(toAdd); } else { UnderlyingScheduler.AddState(toAdd); } }
public void AddState(ExecutionState toAdd) { InitLoopInfoFor(toAdd); UnderlyingScheduler.AddState(toAdd); }