[Mono-bugs] [Bug 24607] New - Thread startup is not blocking until thread is completely started.
bugzilla-daemon@rocky.ximian.com
bugzilla-daemon@rocky.ximian.com
13 May 2002 08:25:15 -0000
Please do not reply to this email- if you want to comment on the bug, go to the
URL shown below and enter your comments there.
Changed by gellyfish@gellyfish.com.
http://bugzilla.ximian.com/show_bug.cgi?id=24607
--- shadow/24607 Mon May 13 04:25:15 2002
+++ shadow/24607.tmp.7608 Mon May 13 04:25:15 2002
@@ -0,0 +1,75 @@
+Bug#: 24607
+Product: Mono/Runtime
+Version: unspecified
+OS: other
+OS Details: Red Hat Linux release 7.0 (Guinness) Kernel 2.2.16-22 on an i686
+Status: NEW
+Resolution:
+Severity:
+Priority: Major
+Component: misc
+AssignedTo: mono-bugs@ximian.com
+ReportedBy: gellyfish@gellyfish.com
+QAContact: mono-bugs@ximian.com
+TargetMilestone: ---
+URL:
+Cc:
+Summary: Thread startup is not blocking until thread is completely started.
+
+Description of Problem:
+
+Threads appear not to be run - the main thread exits before the thread is
+started.
+
+This code demonstrates:
+namespace Gellyfish
+{
+ using System;
+ using System.Threading;
+
+ class TestThread
+ {
+
+ public TestThread()
+ {
+ Console.WriteLine("In Constructor");
+ try
+ {
+
+ Thread th = new Thread(new ThreadStart(DoThread));
+ th.Start();
+ }
+ catch(Exception e)
+ {
+ Console.WriteLine("Listening :" + e.ToString());
+ }
+ }
+
+ private void DoThread()
+ {
+ Console.WriteLine("In DoThread");
+ }
+
+ public static void Main()
+ {
+ TestThread theThread = new TestThread();
+ }
+ }
+}
+
+
+
+Actual Results:
+
+ In Contructor
+
+Expected Results:
+
+ In Constructor
+ In DoThread
+
+How often does this happen?
+
+ Every time I have tried it.
+
+A