Merge pull request #4938 from kumpera/optimize_ref_queries
[mono.git] / mono / tests / main-returns-background.cs
1
2 using System;
3 using System.Threading;
4
5 public class foo {
6         public static void Main() {
7                 Thread thr=new Thread(new ThreadStart(foo.thread));
8                 thr.IsBackground=true;
9                 thr.Start();
10                 Thread.Sleep(1200);
11                 Console.WriteLine("Main thread returns");
12         }
13
14         public static void thread() {
15                 Console.WriteLine("Thread running");
16                 Thread.Sleep(500);
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         }
25 }
26