[Mono-bugs] [Bug 81656][Nor] New - [PATCH] Thread.ApartmentState does not match MS 1.x
bugzilla-daemon at bugzilla.ximian.com
bugzilla-daemon at bugzilla.ximian.com
Thu May 17 11:23:12 EDT 2007
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 gert.driesen at pandora.be.
http://bugzilla.ximian.com/show_bug.cgi?id=81656
--- shadow/81656 2007-05-17 11:23:12.000000000 -0400
+++ shadow/81656.tmp.25573 2007-05-17 11:23:12.000000000 -0400
@@ -0,0 +1,66 @@
+Bug#: 81656
+Product: Mono: Runtime
+Version: 1.0
+OS:
+OS Details:
+Status: NEW
+Resolution:
+Severity:
+Priority: Normal
+Component: misc
+AssignedTo: mono-bugs at ximian.com
+ReportedBy: gert.driesen at pandora.be
+QAContact: mono-bugs at ximian.com
+TargetMilestone: ---
+URL:
+Cc:
+Summary: [PATCH] Thread.ApartmentState does not match MS 1.x
+
+Our implementation of Thread.ApartmentState does not match that of MS 1.x.
+
+On .NET 1.x, the ApartmentState of the main thread should be initialized
+to Unknown if no STAThread attribute is applied to the main method.
+
+The same goes for thread's that are explicitly created.
+
+The attached patch fixes the behaviour for the 1.0 profile while
+respecting the current behaviour on the 2.0 profile.
+
+To reproduce, compile and run the attached code snippet on both 1.0 and
+2.0 profile.
+
+Expected:
+
+1.0 profile:
+
+MAIN: Unknown
+T1: Unknown
+T2: STA
+T3: MTA
+MAIN: Unknown
+
+2.0 profile:
+
+MAIN: MTA
+T1: MTA
+T2: STA
+T3: MTA
+MAIN: MTA
+
+Actual result:
+
+1.0 profile:
+
+MAIN: MTA
+T1: MTA
+T2: STA
+T3: MTA
+MAIN: MTA
+
+2.0 profile:
+
+MAIN: MTA
+T1: MTA
+T2: STA
+T3: MTA
+MAIN: MTA
More information about the mono-bugs
mailing list