[interp] Remove unreachable code (#12411)
[mono-project.git] / mono / tests / thread-dump.cs
blob4b2287059ccdebec9003ea84e251356f6911d7b1
1 using System;
2 using System.Reflection;
3 using System.Threading;
5 //
6 // This is a test program for the thread dump support in the runtime
7 //
8 // Usage:
9 // - start it
10 // - send it a SIGQUIT signal using pkill -QUIT mono
13 public class Tests {
15 public static Object lock_object;
17 public static void run () {
18 while (true)
22 public static void wait () {
23 Monitor.Enter (lock_object);
26 public static void Main () {
27 lock_object = new Object ();
28 Monitor.Enter (lock_object);
30 Thread.CurrentThread.Name = "Main";
32 Thread t1 = new Thread (new ThreadStart (run));
33 t1.Name = "Thread1";
34 t1.Start ();
35 Thread t2 = new Thread (new ThreadStart (run));
36 t2.Name = "Thread2";
37 t2.Start ();
39 Thread t3 = new Thread (new ThreadStart (wait));
40 t3.Name = "WaitThread";
41 t3.Start ();