[WinForms] Fix #18506 ActiveTracker, do not propagate message to control when it...
[mono-project.git] / mono / tests / threadpool-exceptions3.cs
blob9f6215ce34188b180caf93284940a6e55b61f5f1
1 using System;
2 using System.Threading;
4 class Test {
5 static int Main ()
7 AppDomain.CurrentDomain.UnhandledException += OnUnhandledException;
8 WaitCallback wcb = new WaitCallback ((a) => {
9 throw new Exception ("From the threadpoool");
10 });
11 wcb.BeginInvoke (wcb, null, null);
12 Thread.Sleep (1000);
13 return 0;
16 static void OnUnhandledException (object sender, UnhandledExceptionEventArgs e)
18 Environment.Exit (1);