Exemple #1
0
        public static bool TryLock(long QQNum, string Cmd, TimeSpan ExpirySpan)
        {
            if (CmdLockRec.IsLocked(QQNum, Cmd))
            {
                return(false);
            }

            CmdLockRec.Insert(QQNum, Cmd, ExpirySpan);
            return(true);
        }
Exemple #2
0
 public static void ReleaseLock(long QQNum, string Cmd)
 {
     CmdLockRec.ReleaseLock(QQNum, Cmd);
 }