Remove MonoTouch specific code that is now handled without reflection
authorSebastien Pouliot <sebastien@xamarin.com>
Tue, 12 Mar 2013 20:04:26 +0000 (16:04 -0400)
committerSebastien Pouliot <sebastien@xamarin.com>
Tue, 12 Mar 2013 20:04:43 +0000 (16:04 -0400)
mcs/class/corlib/System.Threading/Thread.cs

index 5e3c89e17a94fd82055a04ad9eabeceeb9e44f4a..8fd3dfd96b6764b70d651f14aafa97e8b42d36d0 100644 (file)
@@ -672,31 +672,6 @@ namespace System.Threading {
                        }
                }
 
-#if MONOTOUCH
-               static ConstructorInfo nsautoreleasepool_ctor;
-               
-               IDisposable GetNSAutoreleasePool ()
-               {
-                       if (nsautoreleasepool_ctor == null) {
-                               Type t = Type.GetType ("MonoTouch.Foundation.NSAutoreleasePool, monotouch, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null");
-                               nsautoreleasepool_ctor = t.GetConstructor (Type.EmptyTypes);
-                       }
-                       return (IDisposable) nsautoreleasepool_ctor.Invoke (null);
-               }
-               
-               private void StartInternal ()
-               {
-                       using (var pool = GetNSAutoreleasePool ()) {
-                               current_thread = this;
-                       
-                               if (threadstart is ThreadStart) {
-                                       ((ThreadStart) threadstart) ();
-                               } else {
-                                       ((ParameterizedThreadStart) threadstart) (start_obj);
-                               }
-                       }
-               }
-#else
                private void StartInternal ()
                {
                        current_thread = this;
@@ -707,7 +682,7 @@ namespace System.Threading {
                                ((ParameterizedThreadStart) threadstart) (start_obj);
                        }
                }
-#endif
+
                public void Start() {
                        // propagate informations from the original thread to the new thread
                        if (!ExecutionContext.IsFlowSuppressed ())