Change the order of tasks in the final list to "new List { taskThree, taskTwo, taskOne }" to see why it doesn't work the way you want it to. It will wait for three seconds before it cancels the "CancelationToken".
@@sa-es-ir U didnt get what he want to say, it is not about worst case, it is about reordering await affects execution time in you approach, if last task will wait 1 sec before exeption, you still will wait 3 sec because of first task 3 sec delay
@@igormelnikov5166 Yes your scenario is perfectly fine and can happen because there is no way to know task priorities, my point is, even in worst case (taking 3 sec) is the same Task.WhenAll which always takes 3 sec. Am I correct?
@@sa-es-ir There is a way to respect task priorities, read my first comment. Worst cases are same in all soulutions ofcourse. But in average solutions have different time
Thank you for your useful tips
Happy you like it
Thank you for the content ❤
Glad you like it, I would appreciate it if you share this video on your network🙏
Great!
Glad you like it, I would appreciate it if you share this video on your network🙏
Perfect
Thank you
Change the order of tasks in the final list to "new List { taskThree, taskTwo, taskOne }" to see why it doesn't work the way you want it to. It will wait for three seconds before it cancels the "CancelationToken".
Yes, it can be improving by dequeueing waiting each task via WaitAny mutiple times, but it can increase memory and CPU allocation.
In the worst case, it just behaves like Task.WhenAll()!
@@sa-es-ir U didnt get what he want to say, it is not about worst case, it is about reordering await affects execution time in you approach, if last task will wait 1 sec before exeption, you still will wait 3 sec because of first task 3 sec delay
@@igormelnikov5166 Yes your scenario is perfectly fine and can happen because there is no way to know task priorities, my point is, even in worst case (taking 3 sec) is the same Task.WhenAll which always takes 3 sec. Am I correct?
@@sa-es-ir There is a way to respect task priorities, read my first comment. Worst cases are same in all soulutions ofcourse. But in average solutions have different time
❤❤❤❤❤❤❤❤❤❤❤
Thank you baba♥
Awesome explanation
Glad you like it, I would appreciate it if you share this video on your network🙏