Use Task.WhenAll For A Nice Performance Boost #shorts

preview_player
Показать описание

Рекомендации по теме
Комментарии
Автор

Worth mentioning that EF Core does not support multiple parallel operations being run on the same DbContext instance, and trying to do so leads to runtime exceptions.

nathansickle
Автор

Great content Milan. Thanks for sharing!

acartunahan
Автор

Very efficiently presented. Thank you.

Someone-tnur
Автор

do you guys have link for this? or any documentation I can study to

kr_
Автор

The concept is analog to the Promises concept in JS.

sdscode
Автор

I tried this when different return types but getting am errors, but when same type or no return type it was success.

jouchiwinchester
Автор

Hi Milan. Thanks for you awesome job.
With regard to this feature, it's important to point out that, to retrieve exceptions from all these tasks, you need to loop through the InnerExceptions array, which is contained in the ArgumentException object and not the Exception object.
If you don't do this, you'll only retrieve the first exception if there are several.

StephaneBELKHERAZ
Автор

How to handle the exceptions when one of the async task throws it

bmassioui
Автор

It might be better if you show how to handle aggregation exception in this case 😊

TungNguyen-ykub
Автор

what language is this ?
can anyone help me ?

gayathri
Автор

im sorry i got confused, what is this language mojo?

itRemindsMeThatItNotSoBad
Автор

Brother, you are doing good, but i did not understand in which language you are coding

muhammadrahman
Автор

Task.WhenAll sequential iterates over the tasks. So it's basically the same if you just await all 3 tasks.
Also never use the .Result property in other cases than this. If you really want and asynchronous method to run synchronous, then call .GetAwaiter().GetResult().

lolroflxd