| Start |
|---|
| Pseudocode for async/await keywords Consider a simple asynchronous method: Simplifying, we can say that this code actually means the following: It means that |
| Disabling synchronization context To disable synchronization context you should call the ConfigureAwait provides a means to avoid the default SynchronizationContext capturing behavior; passing false for the flowContext parameter prevents the SynchronizationContext from being used to resume execution after the await. Quote from It's All About the SynchronizationContext (opens new window). |
| Why SynchronizationContext is so important? Consider this example: This method will freeze UI application until the You can try run inner code asynchronously: But this code won't execute because inner body may be run on non-UI thread and it shouldn't change UI properties directly (opens new window): Now don't forget always to use this pattern. Or, try |
Read Article
https://develop.horje.com/learn/1434/reference