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.
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.
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 ...)
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.
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?
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.
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.
What to do when you got problem with calling async method from sync? Just stop having problem, don't call it, fantastic solution
That is by far the worst fix of a problem I have ever seen. Solution: "Don't have the problem to begin with".
So basically there is no fix for calling an async method from a sync context on the same thread...?
The key is to go back in time and never write any sync APIs in the first place.
yeah but when u r to incorporate some newer libs to ur legacy code. It always produces stuff like that. Even may cause deadlocks
Dude is a bassist. Got to respect him
bass is lif
On what basis?
Awesome. Keep it going.
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?
but asynchronous does not mean multithreading. We do not know in which thread will our async code run. Or am i wrong?
Thnks man you are a magician!!
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?
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.
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 ...)
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.
what is the font of the editor?
Very helpful. Thanks! Also cool name mr. Markdown.
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?
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.
TLDR; change all sync to async. No help to maintainers of fixed Interfaces.
Make it available in linux please
koi use bhi karta c# ab
Has bass 25% developers worldwide.