This article from states that SynchronizationContext
may flow with ExecutionContext
:
private void button1_Click(object sen
When does Task.Run flow SynchronizationContext with ExecutionContext?
Never.
The point of that article is that (the public API for) flowing ExecutionContext
will flow SynchronizationContext
. But Task.Run
(and "pretty much any asynchronous operation whose core implementation resides in mscorlib") will never do this.
The paragraph starting with "My expectation is valid if" is hypothetical. He's describing what would happen if Task.Run
use the public API for flowing ExecutionContext
. This would cause problems if it did this. That's why it doesn't ever do this.