public void Set() { _isEventSet = true; if (_blockSimulation == null) { _blockSimulation = new BlockSimulationEvent(this, _engine); _engine.AddEvent(_blockSimulation); } else { _blockSimulationEvent.Reset(); } if (_simulationEvent != null) { _engine.CancelEvent(_simulationEvent); _simulationEvent = null; } _mainEvent.Set(); }
internal void Block() { _blockSimulation = null; _blockSimulationEvent?.WaitOne(); }
public SimulatedResetEvent(SimulationEngine engine) { _engine = engine; _blockSimulation = new BlockSimulationEvent(this, _engine); _engine.AddEvent(_blockSimulation); }