Mastering Development

ActionBlock appears to complete before I want it to

I have an ActionBlock as part of my class: private readonly ActionBlock<QueueMessage> block; In the constructor, I initialize it like so: block = new ActionBlock<QueueMessage>(async s => await Process(s), new ExecutionDataflowBlockOptions { MaxDegreeOfParallelism = maxParallelism }); My Process method is implemented as: private async Task Process(QueueMessage message) { using var tx = stateManager.CreateTransaction(); var result […]