Example #1
0
 private void tmrCheck_Tick(object sender, EventArgs e)
 {
     using (ThreadLocker locker = ThreadLocker.AttemptLock(_actions))
     {
         if (locker.IsLocked && _actions.Count > 0)
         {
             ShowBusy();
         }
         else
         {
             HideBusy();
         }
     }
 }
Example #2
0
 public static void PopAction()
 {
     using (ThreadLocker.AttemptLock(_actions))
         _actions.Pop();
 }