Align libgc vcxproj with makefile.
[mono.git] / mono / tests / threadpool-exceptions7.cs
1
2 using System;
3 using System.Threading;
4
5 class Test {
6         static int Main ()
7         {
8                 AppDomain.CurrentDomain.UnhandledException += OnUnhandledException;
9                 OtherDomain ();
10                 return 0;
11         }
12
13         static void OtherDomain ()
14         {
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);
24         }
25
26         static void OnUnhandledException (object sender, UnhandledExceptionEventArgs e)
27         {
28                 Environment.Exit (1);
29         }
30 }
31