示例#1
0
        public async Task <R> ExecuteAsync <R>(Query <M, R> query)
        {
            var response = new WriteOnceBlock <object>(r => r);

            _executionPipeline.Post(new QueryRequest(query, response));
            return((R)await response.ReceiveAsync());
        }
示例#2
0
 private void Go(CommandRequest[] batch)
 {
     _batchSizes.Add(batch.Length);
     _journalWriter.AppendAsync(batch.Select(ctx => ctx.Command))
     .ContinueWith(t => _dispatcher.Post(batch));
     SetTimer();
 }