DEV Community

Discussion on: A Simple Trick to Boost Performance of Async Code in C#

 
davidkroell profile image
David Kröll

Yes thats true if you can determine the runtimes that exact this would be a neat option.

Thread Thread
 
andreasjakof profile image
Andreas Jakof

Therefore the last option with ContinueWith is the better (best?) solution. Even if you don‘t know the runtimes exacty. It makes sure, run the tasks in parallel, that can while also making Visual, that these tasks (toast, butter, jam) are in sequence.

Nevertheless it is usually enough to know that A takes longer than B to start them in the „right“ order.