Exemplo n.º 1
0
        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;
        }
Exemplo n.º 2
0
 /// <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);
     }
 }
Exemplo n.º 3
0
 /// <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;
     }
 }