Merge pull request #5714 from alexischr/update_bockbuild
[mono.git] / mono / tests / main-exit.cs
1
2 using System;
3 using System.Threading;
4
5 public class foo {
6         public static int Main() {
7                 Environment.ExitCode = 2;
8                 Thread thr=new Thread(new ThreadStart(foo.thread));
9                 thr.Start();
10                 Thread.Sleep(1200);
11                 Console.WriteLine("Main thread exiting");
12                 Environment.Exit(0);
13                 return 1;
14         }
15
16         public static void thread() {
17                 Console.WriteLine("Thread running");
18                 Thread.Sleep(500);
19                 Console.WriteLine("Thread running");
20                 Thread.Sleep(500);
21                 Console.WriteLine("Thread running");
22                 Thread.Sleep(500);
23                 Console.WriteLine("Thread running");
24                 Thread.Sleep(500);
25                 Console.WriteLine("Thread running");
26         }
27 }
28