public void DestroyThread(int index) { SafeDebug.Assert(this.executionMonitors[index] != null, "this.executionMonitors[index] != null"); IThreadExecutionMonitor m = this.executionMonitors[index]; m.Destroy(); this.destroyedExecutionMonitorIds.Enqueue(index); this.executionMonitors[index] = null; }
/// <summary> /// Tries to create a new thread monitor. /// </summary> /// <param name="threadID">ThreadId</param> /// <param name="monitor">IThreadExecutionMonitor</param> /// <returns>Boolean</returns> bool IThreadMonitorFactory.TryCreateThreadMonitor(int threadID, out IThreadExecutionMonitor monitor) { if (this.Monitors.Count == 0) { monitor = null; return(false); } else { monitor = new ThreadExecutionMonitorDispatcher(this.Host.Log, threadID, this, this.TestingEngine, this.Configuration); return(true); } }
/// <summary> /// Tries to create a new thread monitor. /// </summary> /// <param name="threadID">ThreadId</param> /// <param name="monitor">IThreadExecutionMonitor</param> /// <returns>Boolean</returns> bool IThreadMonitorFactory.TryCreateThreadMonitor(int threadID, out IThreadExecutionMonitor monitor) { if (this.Monitors.Count == 0) { monitor = null; return false; } else { monitor = new ThreadExecutionMonitorDispatcher(this.Host.Log, threadID, this, this.TestingEngine, this.Configuration); return true; } }