I\'m trying to play a bit with C#\'s async/await/continuewith. My goal is to have to have 2 tasks which are running in parallel, though which task is executing a sequence of
When chaining multiple tasks using the ContinueWith method, your return type will be Task whereas T is the return type of the delegate/method passed to ContinueWith.
As the return type of an async delegate is a Task, you will end up with a Task and end up waiting for the async delegate to return you the Task which is done after the first await.
In order to correct this behaviour, you need to use the returned Task, embedded in your Task. Use the Unwrap extension method to extract it.