async Programming
Introduction
Why is a Synchronization Context Needed?
// Assume this is a click handler for a button: async void HandleButtonClicked(object sender, EventArgs args) { AnnounceButtonClicked(); await Task.Delay(1000); // ------Remainder of method may not be on the primary thread Button.IsEnabled = false; }Adding the SingleThreadSynchronizationContext
Last updated
Was this helpful?

