Created
February 18, 2016 14:15
-
-
Save maynardflies/b74f2d845311d70fefae to your computer and use it in GitHub Desktop.
Code which causes Environment.Exit hang
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Windows; | |
namespace CefSharp.MinimalExample.Wpf | |
{ | |
public partial class MainWindow : Window | |
{ | |
public MainWindow() | |
{ | |
InitializeComponent(); | |
AppDomain.CurrentDomain.ProcessExit += CurrentDomain_ProcessExit; | |
} | |
void CurrentDomain_ProcessExit(object sender, EventArgs e) | |
{ | |
Application.Current.Dispatcher.Invoke(new Action(Cef.Shutdown)); | |
} | |
private void ButtonBase_OnClick(object sender, RoutedEventArgs e) | |
{ | |
Environment.Exit(0); | |
} | |
} | |
} |
The hang occurs whether or not you call Shutdown
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Created for cefsharp/CefSharp#990