Created
April 25, 2012 14:42
-
-
Save kumpera/2490253 to your computer and use it in GitHub Desktop.
This file contains hidden or 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.Threading; | |
| class Driver { | |
| ~Driver () { | |
| Console.WriteLine ("FIN"); | |
| throw new Exception (); | |
| } | |
| static void Main () { | |
| var t = new Thread (()=> new Driver ()); | |
| AppDomain.CurrentDomain.UnhandledException += (a,b) => Console.WriteLine ("EH {0} {1}", a.GetType (), b.GetType ()); | |
| t.Start (); | |
| t.Join (); | |
| GC.Collect (); | |
| GC.WaitForPendingFinalizers (); | |
| Console.WriteLine ("DOES IT PRINT OR DOES IT NOT?"); | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment