public void AddToQueueForExecution(Action asyncAction)
        {
            _asyncActionQueueWorker.AddToExecutionQueue(() => {
                _flowCounter.WaitForCounterChangeWhileNotPredecate(curCount => curCount < _maxFlow);

                _flowCounter.IncrementCount();
                asyncAction();
            });
        }
 public void AddToExecutionQueue(TItem item)
 {
     _items.Enqueue(item);
     _counter.IncrementCount();
 }
예제 #3
0
 public void IncrementCount(TKey key)
 {
     GetCounter(key).IncrementCount();
     _totalCounter.IncrementCount();
 }