Permalink
Browse files

2005-05-12 Lluis Sanchez Gual <lluis@novell.com>

	* main-returns-background-change.cs: New test for changing the
	background mode of a thread.


svn path=/trunk/mono/; revision=44428
  • Loading branch information...
1 parent b7b66f6 commit 13b8bf561af50d041db4533697a564bf8d5afec6 @slluis slluis committed May 12, 2005
Showing with 32 additions and 0 deletions.
  1. +5 −0 mono/tests/ChangeLog
  2. +1 −0 mono/tests/Makefile.am
  3. +26 −0 mono/tests/main-returns-background-change.cs
View
@@ -1,3 +1,8 @@
+2005-05-12 Lluis Sanchez Gual <lluis@novell.com>
+
+ * main-returns-background-change.cs: New test for changing the
+ background mode of a thread.
+
2005-05-01 Zoltan Varga <vargaz@freemail.hu>
* libtest.c (mono_test_marshal_cdecl_delegate): New test for changing the calling convention of
View
@@ -202,6 +202,7 @@ TEST_CS_SRC= \
main-returns-background-abort-resetabort.cs \
main-returns-background-resetabort.cs \
main-returns-background.cs \
+ main-returns-background-change.cs \
main-returns.cs \
subthread-exit.cs \
desweak.cs
@@ -0,0 +1,26 @@
+
+using System;
+using System.Threading;
+
+public class foo {
+ public static void Main() {
+ Thread thr=new Thread(new ThreadStart(foo.thread));
+ thr.Start();
+ Console.WriteLine("Main thread returns");
+ }
+
+ public static void thread() {
+ Console.WriteLine("Thread running");
+ Thread.Sleep(500);
+ Console.WriteLine("Thread running");
+ Thread.Sleep(500);
+ Thread.CurrentThread.IsBackground = true;
+ Console.WriteLine("Thread running");
+ Thread.Sleep(500);
+ Console.WriteLine("Thread running");
+ Thread.Sleep(500);
+ Console.WriteLine("Thread running");
+ Environment.Exit (1);
+ }
+}
+

0 comments on commit 13b8bf5

Please sign in to comment.