Synchronization context
When dealing with asynchronous method calls using TAP, it is important to understand that async and await are language constructs provided by C# and that the actual multithreaded execution is the injected compiler-generated code that's used to replace the async/await blocks. If the compiler-generated asynchronous state machine is closely observed and the async method builder is analyzed, you will notice that at the start of any asynchronous await call, the current synchronization context is captured and, later on, when the asynchronous operation is completed, it is used again to execute the continuation action.
In a Xamarin application, the synchronization context – which is similar to the execution context – refers ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access