public Task Handle(MyMessage message, IMessageHandlerContext context) { var longRunning1 = Task.Run(() => ComputeBoundComponent.BlocksForALongTime()); var longRunning2 = Task.Run(() => ComputeBoundComponent.BlocksForALongTime()); return(Task.WhenAll(longRunning1, longRunning2)); }
public Task Handle(MyMessage message, IMessageHandlerContext context) { ComputeBoundComponent.BlocksForAShortTime(); return(Task.CompletedTask); }