public void Pause() { if (RuntimeUtils.Pausable(this.State)) { this.State = RunState.Pausing; this.PauseImpl(); if (this.State == RunState.Pausing) { this.State = RunState.Paused; } } }