Ver Fonte

2009-10-20 Jb Evain <[email protected]>

	* Thread.cs: change type of the current_appcontext field to object
	to avoid triggering static constructors unless explicitely required.


svn path=/trunk/mcs/; revision=144431
Jb Evain há 16 anos atrás
pai
commit
d40cd894df

+ 5 - 0
mcs/class/corlib/System.Threading/ChangeLog

@@ -1,3 +1,8 @@
+2009-10-20  Jb Evain  <[email protected]>
+
+	* Thread.cs: change type of the current_appcontext field to object
+	to avoid triggering static constructors unless explicitely required.
+
 2009-10-16 Gonzalo Paniagua Javier <[email protected]>
 
 	* Timer.cs: looks like any negative value is treated as Infinite.

+ 3 - 1
mcs/class/corlib/System.Threading/Thread.cs

@@ -79,7 +79,9 @@ namespace System.Threading {
 		private UIntPtr static_data; /* GC-tracked */
 		private IntPtr jit_data;
 		private IntPtr lock_data;
-		Context current_appcontext;
+		/* current System.Runtime.Remoting.Contexts.Context instance
+		   keep as an object to avoid triggering its class constructor when not needed */
+		private object current_appcontext;
 		internal int stack_size;
 		private IntPtr appdomain_refs;
 		private int interruption_requested;