linux-packaging-mono/mono/tests/main-returns-background.cs
Jo Shields a575963da9 Imported Upstream version 3.6.0
Former-commit-id: da6be194a6b1221998fc28233f2503bd61dd9d14
2014-08-13 10:39:27 +01:00

27 lines
568 B
C#

using System;
using System.Threading;
public class foo {
public static void Main() {
Thread thr=new Thread(new ThreadStart(foo.thread));
thr.IsBackground=true;
thr.Start();
Thread.Sleep(1200);
Console.WriteLine("Main thread returns");
}
public static void thread() {
Console.WriteLine("Thread running");
Thread.Sleep(500);
Console.WriteLine("Thread running");
Thread.Sleep(500);
Console.WriteLine("Thread running");
Thread.Sleep(500);
Console.WriteLine("Thread running");
Thread.Sleep(500);
Console.WriteLine("Thread running");
}
}