AsyncLocal and Scoped Services in ASP.NET Core
Вставка
- Опубліковано 14 тра 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-coding.dev
Buy my Merch 🛒 shop.raw-coding.dev
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.
Good stuff, learned a lot.
Nicely explained, thanks for the great content
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