Ejemplo n.º 1
0
 /// <summary>
 ///
 /// </summary>
 public void Stop()
 {
     if (this.Running == null)
     {
         //尚未运行
         return;
     }
     this.Running = null;
     try { this.End(); } catch (Exception e) { }
     this.DoExitService();
     lock (this.threadpool)
     {
         while (this.threadpool.Count() > 0)
         {
             ThreadShell item = this.threadpool.Get();
             item.DoDispose();
         }
     }
     this.threadpool.DoDispose();
     this.delegatepool.DoDispose();
 }
Ejemplo n.º 2
0
 protected void AddThread(ThreadShell item)
 {
     this.threadpool.Set(item);
 }