mirror of
https://github.com/gui-cs/Terminal.Gui.git
synced 2025-12-30 17:57:57 +01:00
Reset synchronization context on Application.Shutdown()
- Fixes https://github.com/migueldeicaza/gui.cs/issues/1084 Reset synchronization context to allow the user to run async/await, as the main loop has been ended, the synchronization context from gui.cs does no longer process any callbacks.
This commit is contained in:
@@ -540,6 +540,12 @@ namespace Terminal.Gui {
|
||||
Driver?.End ();
|
||||
Driver = null;
|
||||
_initialized = false;
|
||||
|
||||
// Reset synchronization context to allow the user to run async/await,
|
||||
// as the main loop has been ended, the synchronization context from
|
||||
// gui.cs does no longer process any callbacks. See #1084 for more details:
|
||||
// (https://github.com/migueldeicaza/gui.cs/issues/1084).
|
||||
SynchronizationContext.SetSynchronizationContext (syncContext: null);
|
||||
}
|
||||
|
||||
static void Redraw (View view)
|
||||
|
||||
Reference in New Issue
Block a user