Ejemplo n.º 1
0
        public Task Handle(MyMessage message, IMessageHandlerContext context)
        {
            var longRunning1 = Task.Run(() => ComputeBoundComponent.BlocksForALongTime());
            var longRunning2 = Task.Run(() => ComputeBoundComponent.BlocksForALongTime());

            return(Task.WhenAll(longRunning1, longRunning2));
        }
Ejemplo n.º 2
0
 public Task Handle(MyMessage message, IMessageHandlerContext context)
 {
     ComputeBoundComponent.BlocksForAShortTime();
     return(Task.CompletedTask);
 }