2 using System.Threading;
9 monitor = new object ();
10 AppDomain.CurrentDomain.UnhandledException += OnUnhandledException;
11 ThreadPool.QueueUserWorkItem ((a) => {
12 throw new Exception ("From the threadpoool");
15 Monitor.Wait (monitor);
21 static void OnUnhandledException (object sender, UnhandledExceptionEventArgs e)
24 Monitor.Pulse (monitor);