private void Go(CommandRequest[] batch)
 {
     _batchSizes.Add(batch.Length);
     _journalWriter.AppendAsync(batch.Select(ctx => ctx.Command))
         .ContinueWith(t => _dispatcher.Post(batch));
     SetTimer();
 }
 public void Post(CommandRequest request)
 {
     if (_timer == null)
     {
         _timer = new Timer(OnTimerTick);
         SetTimer();
     }
     _requestQueue.Post(request);
 }
Пример #3
0
 //accept a batch of commands to be executed
 internal void Post(CommandRequest[] commands)
 {
     _commandQueue.Post(commands);
 }