Let me give this specific-answer question a specific answer. You say your answer isn't notably different from the other answers. Let's check that against the "facts". For context: Here's my explanatory comment:
Your first point is not sourced at all ... I'd say [citation needed]. The second point is a link-only answer, which is discouraged and the third reads like an advertisement. Overall IMO your answer suffers from a credibility problem :( -1
Now let's go along your answer, comparing it to the other answers:
- Running Parallelism is for better efficiency and speed when executing the same code repeatedly.
This don't quote any sources. It's also lacking elaboration. Overall this is a blanket statement and I'm sure I can come up with a few scenarios where this is not true.
Let's compare this to the answer by Peter Taylor:
Firstly, the purpose of AsParallel
is to split work between multiple threads; the purpose of async
/await
is to avoid the need for multiple threads when handling things such as I/O. So combining AsParallel
with async
/await
is a code smell.
This is an easily verifiable claim, and at that it's one I know to be true.
- You can get threading wrong for not watching out for common threading issues. Msdn link has some good General Recommendations.
Well ... this is only a link. For the sake of argument let's assume that msdn went down for a while. At this point that sentence becomes utterly useless, because there could've been anything behind that link. Let's also ignore that OP has to jump through hoops to get usable information out of this.
Let's compare this to RobHs answer:
This is the sort of code that will bite you later when you find out that a synchronisation context can cause a deadlock. See Stephen Cleary's blog post on the subject of an async deadlock.
While this isn't significantly more information than your link, it is explained more than yours, because it's coupled with a direct observation of the code under review. As such it's much more valuable, because it observes and names a problem. Your answer just repeats some conventional wisdom ("Multithreading is hard").
- Not really, async and await is not the same as Parallelism as you might be thinking, there is an excellent course on Pluralsight which explained what it was and how it was properly implemented. - I'm not sure if I can provide a link can a moderator let me know?
IIRC SE moderators had some minor issues with Pluralsight quite a while back about advertisements to their courses. I might be wrong here, but alas. The question you pose there is meta-concerns. They don't usually go well in an answer and should be cleared up here on meta or in chat.
The next section is basically the usable part of the answer (as of now). Unfortunately Peter Taylor also has that information in their answer, a bit more extensive and clearer.
The tipping point for me was already reached, but if that wasn't enough the answer also includes an incomplete rewrite of the code, which is completely moot. The actionable advice boils down to a single sentence ("[..]delete method1
and use Async and await all the way through the code."). Any C# programmer with a few months experience should be easily able to piece together what the code looks like after applying that.
I hope you understand the reasoning behind my downvote a bit better now :)