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()); }
private void Go(CommandRequest[] batch) { _batchSizes.Add(batch.Length); _journalWriter.AppendAsync(batch.Select(ctx => ctx.Command)) .ContinueWith(t => _dispatcher.Post(batch)); SetTimer(); }