2 using System
.Threading
;
6 static AutoResetEvent mre
= new AutoResetEvent(false);
10 AppDomain
.CurrentDomain
.ProcessExit
+= SomeEndOfProcessAction
;
13 static void SomeEndOfProcessAction(object sender
, EventArgs args
)
15 ThreadPool
.QueueUserWorkItem (new WaitCallback (ThreadPoolCallback
));
16 if (mre
.WaitOne(1000))
17 Console
.WriteLine ("PASS");
19 Console
.WriteLine ("FAIL");
22 static void ThreadPoolCallback (object state
)