public void EndActionTpl(Session session)
 {
     if (((session.IsolationLevel != 0x10000) && (session.IsolationLevel != 0x100000)) && ((session.sessionContext.CurrentStatement != null) && (session.sessionContext.Depth <= 0)))
     {
         QNameManager.QName[] tableNamesForRead = session.sessionContext.CurrentStatement.GetTableNamesForRead();
         if (tableNamesForRead.Length != 0)
         {
             lock (this.Lock)
             {
                 this.UnlockReadTablesTpl(session, tableNamesForRead);
                 int num = session.WaitingSessions.Size();
                 if (num != 0)
                 {
                     bool flag = false;
                     for (int i = 0; i < tableNamesForRead.Length; i++)
                     {
                         if (this._tableWriteLocks.Get(tableNamesForRead[i]) != session)
                         {
                             flag = true;
                             break;
                         }
                     }
                     if (flag)
                     {
                         flag = false;
                         for (int j = 0; j < num; j++)
                         {
                             Session session2 = session.WaitingSessions.Get(j);
                             if (ArrayUtil.ContainsAny(tableNamesForRead, session2.sessionContext.CurrentStatement.GetTableNamesForWrite()))
                             {
                                 flag = true;
                                 break;
                             }
                         }
                         if (flag)
                         {
                             this.ResetLocks(session);
                             this.ResetLatchesMidTransaction(session);
                         }
                     }
                 }
             }
         }
     }
 }