Using Tasks with conditional continuations
I think your main problem is that you’re telling those two tasks to “Wait” with your call to Task.WaitAll(onSuccess, onError); The onSuccess and onError continuations are automatically setup for you and will be executed after their antecedent task completes. If you simply replace your Task.WaitAll(…) with taskThrows.Start(); I believe you will get the desired output. … Read more