Fixing sync over async issues in .NET / C# with Visual Studio 2022

  Рет қаралды 23,832

Microsoft Visual Studio

Microsoft Visual Studio

Күн бұрын

Пікірлер: 25
@jhbonarius
@jhbonarius 3 жыл бұрын
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.
@iceangel564
@iceangel564 3 жыл бұрын
What to do when you got problem with calling async method from sync? Just stop having problem, don't call it, fantastic solution
@stefanvestergaard
@stefanvestergaard 3 жыл бұрын
That is by far the worst fix of a problem I have ever seen. Solution: "Don't have the problem to begin with".
@obiwanjacobi
@obiwanjacobi 3 жыл бұрын
So basically there is no fix for calling an async method from a sync context on the same thread...?
@j2pnation
@j2pnation 3 жыл бұрын
The key is to go back in time and never write any sync APIs in the first place.
@Anton-dl7me
@Anton-dl7me 3 жыл бұрын
yeah but when u r to incorporate some newer libs to ur legacy code. It always produces stuff like that. Even may cause deadlocks
@LDdrums20
@LDdrums20 3 жыл бұрын
Dude is a bassist. Got to respect him
@jhbonarius
@jhbonarius 3 жыл бұрын
bass is lif
@SultanOfSuede
@SultanOfSuede 9 ай бұрын
On what basis?
@innovationscode9909
@innovationscode9909 3 жыл бұрын
Awesome. Keep it going.
@joebeattie4234
@joebeattie4234 2 жыл бұрын
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_M
@Peter_M 2 жыл бұрын
but asynchronous does not mean multithreading. We do not know in which thread will our async code run. Or am i wrong?
@screamer220v
@screamer220v 3 жыл бұрын
Thnks man you are a magician!!
@dongler4589
@dongler4589 3 жыл бұрын
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?
@jhbonarius
@jhbonarius 3 жыл бұрын
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?
@sevensolutions77
@sevensolutions77 3 жыл бұрын
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.
@---bi6ne
@---bi6ne 3 жыл бұрын
what is the font of the editor?
@zoran123456
@zoran123456 3 жыл бұрын
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.
@marcotroster8247
@marcotroster8247 3 жыл бұрын
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 ...)
@timmcgee1339
@timmcgee1339 8 ай бұрын
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.
@Jirkass4
@Jirkass4 3 жыл бұрын
Very helpful. Thanks! Also cool name mr. Markdown.
@martinrj30
@martinrj30 2 жыл бұрын
TLDR; change all sync to async. No help to maintainers of fixed Interfaces.
@pixel7038
@pixel7038 3 жыл бұрын
Make it available in linux please
@pranavraj5698
@pranavraj5698 3 жыл бұрын
koi use bhi karta c# ab
@sumanpanda157
@sumanpanda157 3 жыл бұрын
Has bass 25% developers worldwide.
Debugging threads with the Parallel Stacks window
19:50
Microsoft Visual Studio
Рет қаралды 11 М.
What's new in C# 10
29:28
dotnet
Рет қаралды 87 М.
Andro, ELMAN, TONI, MONA - Зари (Official Music Video)
2:50
RAAVA MUSIC
Рет қаралды 2 МЛН
🎈🎈🎈😲 #tiktok #shorts
0:28
Byungari 병아리언니
Рет қаралды 4,5 МЛН
GIANT Gummy Worm #shorts
0:42
Mr DegrEE
Рет қаралды 152 МЛН
Await Async Tasks Are Getting Awesome in .NET 9!
9:24
Nick Chapsas
Рет қаралды 103 М.
Diagnosing thread pool exhaustion issues in .NET Core apps
23:57
Welcome to Visual Studio 2022 - by Scott Hanselman and friends
32:54
Microsoft Visual Studio
Рет қаралды 457 М.
Correcting Common Async/Await Mistakes in .NET - Brandon Minnick
1:00:11
NDC Conferences
Рет қаралды 167 М.
.NET Aspire for Beginners - Full Series
1:28:16
dotnet
Рет қаралды 16 М.
Why is Async code hard to debug?
23:06
Microsoft Visual Studio
Рет қаралды 10 М.
You are doing .NET logging wrong. Let's fix it
25:29
Nick Chapsas
Рет қаралды 175 М.
Debugging tasks with the Parallel Stacks window
11:17
Microsoft Visual Studio
Рет қаралды 5 М.
Settling the Biggest Await Async Debate in .NET
14:47
Nick Chapsas
Рет қаралды 148 М.
Andro, ELMAN, TONI, MONA - Зари (Official Music Video)
2:50
RAAVA MUSIC
Рет қаралды 2 МЛН