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