the problem is in legacy applications, where you cannot make the calling method async. like old webforms. sometimes you need a task.run to prevent a deadlock.
@iceangel5643 жыл бұрын
What to do when you got problem with calling async method from sync? Just stop having problem, don't call it, fantastic solution
@stefanvestergaard3 жыл бұрын
That is by far the worst fix of a problem I have ever seen. Solution: "Don't have the problem to begin with".
@obiwanjacobi3 жыл бұрын
So basically there is no fix for calling an async method from a sync context on the same thread...?
@j2pnation3 жыл бұрын
The key is to go back in time and never write any sync APIs in the first place.
@Anton-dl7me3 жыл бұрын
yeah but when u r to incorporate some newer libs to ur legacy code. It always produces stuff like that. Even may cause deadlocks
@LDdrums203 жыл бұрын
Dude is a bassist. Got to respect him
@jhbonarius3 жыл бұрын
bass is lif
@SultanOfSuede9 ай бұрын
On what basis?
@innovationscode99093 жыл бұрын
Awesome. Keep it going.
@joebeattie42342 жыл бұрын
how do you know the result is OK if you do not look at what came back from the async call? could be a number of errors right?
@Peter_M2 жыл бұрын
but asynchronous does not mean multithreading. We do not know in which thread will our async code run. Or am i wrong?
@screamer220v3 жыл бұрын
Thnks man you are a magician!!
@dongler45893 жыл бұрын
If you really wanted to call asynchronous methods from sync methods, isnt there a way to make it run on the calling thread to act as a sync method?
@jhbonarius3 жыл бұрын
why is the analyzer a nuget package and not a vs extension? do I need to add it to every project in my solution? is there a production performance overhead?
@sevensolutions773 жыл бұрын
I think this is just a compile-time tool, so there shouldnt be any runtime overhead but i havent checked it out yet. Nuget packages may also contain tools.
@---bi6ne3 жыл бұрын
what is the font of the editor?
@zoran1234563 жыл бұрын
As others were already pointed out, this is completely useless information. We already know the benefits of using async over non async API calls. It is known for many years now. I don't really understand what does it have to do with VS 2022 or "fixing sync over async issues", as you didn't had any code to fix. You intentially created a bad code. Issues are not in the API-s, but on the legacy 3rd party libraries which are usually not asynchronous.
@marcotroster82473 жыл бұрын
It's very important to get informed about code linting metrics and coding flaws 😜 How would you justify a redesign when having to clean up messy codebases? 🙈 (just joking, but actually happened in my last project. Glad I'm out there ...)
@timmcgee13398 ай бұрын
No graceful backward compatibility? Our application suite is 6.5 million lines of code that worked flawlessly at very high volume. Now it doesn't on the same code. You don't find out until its under heavy load. A garbage solution by MS.
@Jirkass43 жыл бұрын
Very helpful. Thanks! Also cool name mr. Markdown.
@martinrj302 жыл бұрын
TLDR; change all sync to async. No help to maintainers of fixed Interfaces.