Re:Networking I/O with Virtual Threads – Under the hood
by DaiPlusPlus on Thursday July 08, 2021 @03:54AM
(#27769336)
What you’re describing is just fake-async and that is discouraged in the ecosystem. I’m not aware of any major NuGet packages that use fake-async, and certainly nothing in the BCL.
Re:Networking I/O with Virtual Threads – Under the hood
by pjmlp on Thursday July 08, 2021 @04:54AM
(#27769630)
Not at all.
What I am describing is what a large majority of .NET consulting projects do, because async/await taints the whole call stack up to Main() or event handlers, and almost no one is doing .NET Core projects from scratch.
Just because it is discouraged at conference talks and blog posts, doesn't mean devs aren't doing it on the trenches when dealing with the crossfire of project deadlines and massive codebases.
Re:Networking I/O with Virtual Threads – Under the hood
by DaiPlusPlus on Thursday July 08, 2021 @06:15PM
(#27778284)
> Just because it is discouraged at conference talks and blog posts, doesn't mean devs aren't doing it on the trenches when dealing with the crossfire of project deadlines and massive codebases.
Oh, I'm sure of that, don't worry.
I'm just fortunate that I've never had to experience that myself.
That is why you will find out lots of code bases full of Task.Run() and direct calls to .Result, instead of using async/await operators.
Having worked with both platform since their yearly days, I am not sure which design is actually the best one, considering brown field development.