15 hours ago, swheaties wrote
I didnt say they contradict. They are not relevent.
"Task objects via continuations is confusing for some, and the resultant code is "inside out", making it hard to reason about the behavior. THAT is what async/await solves."
No its not. Async await is not a different syntax for TPL or a different way of reasoning about it (which is arguably why it is as confusing as it is). I think continuation syntax is very sensible but thats my opinion. Substituing await then having the compiler wrap the code in a continuation is far less intuitive - again my opinion.
Async does not guarantee you parallelism. Async requires you to return tasks (or awaitables - but not what you would natively return). It requires (best practice, at least) async all the way down, and also different constructors if you want to implement the pattern completely. Its all busy work if you ask me. My highly unscientific testing shows it slows my app down.
Where you get the benfit if any is on your dbservice/http calls. So why not wrap those calls in a task and just be done with it.
No one said async/await was "a different syntax for TPL". You can think that continuation syntax is "sensible" all you want... the reality is that many (most?) developers find it confusing, and even for those that don't, when the logic is inverted it's harder to read and understand. It makes it very difficult to see the structure of the algorithm. If you disagree, that's fine, but that's purely one person's opinion... many others don't agree with you.
No one said async guarantees you parallelism. Even threads don't guarantee you that, and async is NOT a threading concept. I find it very interesting that you argue against async because it requires you to return Tasks (awaitables, as you admit) but then argue in favor of the TPL. "Async all the way down" is best practice, yes. It's best practice whether or not you're using async/await. So, that's a red herring. Not sure what "different constructors" you're referring to... but I'm willing to bet, like async all the way down, it's not something unique to async/await. I'm suspicious of claims that async/await slows your application down. Just as I'm suspicious of people who think multithreading will speed their application up. Nothing is that simple.