/// <summary> /// Call when you want to suspend execution of the Opcodes until some /// future condition becomes true. The CPU will call yieldTracker.Begin() /// right away, and then after that call yieldTracker.IsFinished() again and /// again until it returns true. Until IsFinished() returns true, the CPU /// will not advance any further into the program in its current "mode". /// Note that the CPU will track "trigger" and "mainline" code separately for /// this purpose. Waiting in mainline code will still allow triggers to run. /// </summary> /// <param name="yieldTracker"></param> public void YieldProgram(YieldFinishedDetector yieldTracker) { switch (currentRunSection) { case Section.Main: mainYields.Add(yieldTracker); break; case Section.Trigger: triggerYields.Add(yieldTracker); break; default: // Should hypothetically be impossible unless we add more values to the enum. break; } yieldTracker.creationTimeStamp = currentTime; yieldTracker.Begin(shared); }
public void YieldProgram(YieldFinishedDetector yieldTracker) { throw new NotImplementedException(); }