[Translation] ExecutionContext vs SynchronizationContext

[Translation] ExecutionContext vs SynchronizationContext I’ve been asked a few times recently various questions about ExecutionContext and SynchronizationContext, such as what’s the difference between them, what it means to “Flow” them, and how they relate to the new async in C# and Visual Basic Relation to the /await keyword. I thought I’d try to address some of these issues here. Warning: This article dives into an advanced area of ​​.NET that most developers will never need to consider. What is an ExecutionContext and what does it mean to make it “spread”? ExecutionContext is one of those things that most developers don’t need to think about. It’s a bit like air: It’s important to have it there, but we don’t think about it until certain critical moments, such as when it goes wrong. In fact, ExecutionContext is just a container for other contexts. Some of these contexts are auxiliary and others are very important to .NET’s execution model, but they all follow the same philosophy I described when describing ExecutionContext: if you must know they exist, either you’re doing super advanced things, or something went wrong. ExecutionContext Information related to “environment” or “context”, which means that it stores data related to the…

Contact Us

Contact us

181-3619-1160

Online consultation: QQ交谈

E-mail: [email protected]

Working hours: Monday to Friday, 9:00-17:30, holidays off

Follow wechat
Scan wechat and follow us

Scan wechat and follow us

Follow Weibo
Back to top
首页
微信
电话
搜索