Author: zoltan
Date: 2005-04-28 15:46:53 -0400 (Thu, 28 Apr 2005)
New Revision: 43742

Modified:
   trunk/mono/mono/metadata/ChangeLog
   trunk/mono/mono/metadata/icall.c
   trunk/mono/mono/metadata/threads.c
Log:
2005-04-28  Zoltan Varga  <[EMAIL PROTECTED]>

        * icall.c (ves_icall_System_Environment_Exit): Remove the 
        suspend_all_other_threads () call for the time being, since it can hang.

        * threads.c (mono_thread_manage): Similarly, disable the waiting for
        the background threads to exit, since it can also hang.


Modified: trunk/mono/mono/metadata/ChangeLog
===================================================================
--- trunk/mono/mono/metadata/ChangeLog  2005-04-28 19:42:31 UTC (rev 43741)
+++ trunk/mono/mono/metadata/ChangeLog  2005-04-28 19:46:53 UTC (rev 43742)
@@ -1,5 +1,11 @@
 2005-04-28  Zoltan Varga  <[EMAIL PROTECTED]>
 
+       * icall.c (ves_icall_System_Environment_Exit): Remove the 
+       suspend_all_other_threads () call for the time being, since it can hang.
+
+       * threads.c (mono_thread_manage): Similarly, disable the waiting for
+       the background threads to exit, since it can also hang.
+
        * class.c (mono_class_init): Applied patch from Ankit Jain 
        ([EMAIL PROTECTED]). Avoid pending init errors when a field refers
        to a nested class using a typeref. Fixes #74734.

Modified: trunk/mono/mono/metadata/icall.c
===================================================================
--- trunk/mono/mono/metadata/icall.c    2005-04-28 19:42:31 UTC (rev 43741)
+++ trunk/mono/mono/metadata/icall.c    2005-04-28 19:46:53 UTC (rev 43742)
@@ -5174,9 +5174,20 @@
        MONO_ARCH_SAVE_REGS;
 
        mono_runtime_set_shutting_down ();
+
        /* Suspend all managed threads since the runtime is going away */
-       mono_thread_suspend_all_other_threads ();
 
+       /* 
+        * Implementing correct suspension of all threads is very hard to do, so
+        * skip it for the moment. This is not a problem, since the 
+        * mini_cleanup function is also changed to return immediately without
+        * freeing up the runtime data structures.
+        * No waiting -> no hangs
+        * No freeing -> no crashes
+        * http://bugzilla.ximian.com/show_bug.cgi?id=71274
+        */
+       //mono_thread_suspend_all_other_threads ();
+
        mono_runtime_quit ();
 
        /* we may need to do some cleanup here... */

Modified: trunk/mono/mono/metadata/threads.c
===================================================================
--- trunk/mono/mono/metadata/threads.c  2005-04-28 19:42:31 UTC (rev 43741)
+++ trunk/mono/mono/metadata/threads.c  2005-04-28 19:46:53 UTC (rev 43742)
@@ -1762,7 +1762,11 @@
        THREAD_DEBUG (g_message ("wait->num is now %d", wait->num));
        if(wait->num>0) {
                /* Something to wait for */
-               wait_for_tids (wait, INFINITE);
+
+               /*
+                * This seems to hang in some cases, so disable it for now.
+                */
+               //wait_for_tids (wait, INFINITE);
        }
        /* 
         * give the subthreads a chance to really quit (this is mainly needed

_______________________________________________
Mono-patches maillist  -  [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches

Reply via email to