AsyncLocal and Scoped Services in ASP.NET Core
HTML-код
- Опубликовано: 27 ноя 2024
- Learn about AsyncLocal class in c# and how you can use it as a scoped service in an asp.net core app.
Support my Work 🤝 / raw_coding
Buy my Courses 📚 learning.raw-c...
Buy my Merch 🛒 shop.raw-codin...
Join the Community 💬 / discord
Tweet Tweet 📣 / anton_t0shik
Tune in LIVE! 🎥 / raw_coding
#csharp #async
“Zeus! Your Son Has Returned. I Bring The Destruction Of Olympus!”
Great video again. Never heard of AsyncLocal up until now.
Nicely explained, thanks for the great content
Good stuff, learned a lot.
Good stuff as always sir.
Really great!
The white screen when you switch to browser is killing me
Don’t leave the house or the sun might kill you
@@RawCoding I only leave my house in the night. Days are for sleeping.
Шикарный материал) спасибо, что освещаешь такие темы) Причем очень доступно и легко для усвоения темы)
So, it behaves like this because http requests are handled asynchronously? -If they were handled synchronously this wouldn't be the behavior?- If they were handled synchronously, it would not have had scoped behavior? I am confused. It is unholy magic
Checked out the implementation of AsyncLocal. It's just glorified Dictionary wrapper LOL
This is called ambient context, and you should be careful with it. It may cause problems with testing and debugging