I\'m trying to understand when to use TaskEx.Run
. I have provided two code sample i wrote below that produce the same result. What i fail to see is why i would ta
The difference between your two DoWork()
methods is that the first one (that uses TaskEx.RunEx()
) is not asynchronous at all. It executes fully synchronously, starts the other task on another thread, and immediately returns a completed Task
. If you await
ed or Wait()
ed on that task, it wouldn't wait until the internal task is completed.