Пример #1
0
 private void CashDeskWork(CashDesk cashDesk, CancellationToken token)
 {
     while (!token.IsCancellationRequested)
     {
         if (cashDesk.Count > 0)
         {
             cashDesk.Dequeue();
             Thread.Sleep(CashDeskSpeed);
         }
     }
 }
Пример #2
0
 private void CashDeskWork(CashDesk cashDesk, int sleep)
 {
     while (isWorking)
     {
         if (cashDesk.Count > 0)
         {
             cashDesk.Dequeue();
             Thread.Sleep(sleep);
         }
     }
 }