Updates for CODEOWNERS
[mono-project.git] / mono / tests / threadpool-exceptions7.cs
blob942662ab97a0a2eb4084628632b463475661e3c6
2 using System;
3 using System.Threading;
5 class Test {
6 static int Main ()
8 AppDomain.CurrentDomain.UnhandledException += OnUnhandledException;
9 OtherDomain ();
10 return 0;
13 static void OtherDomain ()
15 AppDomain domain = AppDomain.CreateDomain ("test");
16 ThreadPool.QueueUserWorkItem (unused => {
17 domain.DoCallBack (() => {
18 // This will get a ThreadAbortedException
19 Thread.Sleep (10000);
20 });
21 });
22 Thread.Sleep (1000);
23 AppDomain.Unload (domain);
26 static void OnUnhandledException (object sender, UnhandledExceptionEventArgs e)
28 Environment.Exit (1);