Пример #1
0
 public void Free()
 {
     if (this.m_lock.TryEnterWriteLock(this.m_nLockTimeout) == false)
     {
         throw new ApplicationException("为 DelayTableCollection 加写锁时失败。Timeout=" + this.m_nLockTimeout.ToString());
     }
     try
     {
         foreach (string key in this.name_table.Keys)
         {
             DelayTable table = (DelayTable)this.name_table[key];
             if (table != null)
             {
                 table.Free();
             }
         }
         this.name_table.Clear();
     }
     finally
     {
         this.m_lock.ExitWriteLock();
     }
 }