The submit method will execute synchronously, and true in the user interface thread. However, one possible concern is that a Send call expands the call stack.
So, for example, the following code:
for (int i = 0; i < 10000000; i++) syncContext.Send(....);
will result in a StackOverflow exception ... So it would be wise to avoid using a synchronization context if you are already using the right thread. I donβt know a single full-fledged way to check which stream was created in the list, in addition to performing internal accounting statements.
source share