Author: lluis
Date: 2005-05-05 16:49:52 -0400 (Thu, 05 May 2005)
New Revision: 44097
Modified:
trunk/mono/mono/metadata/ChangeLog
trunk/mono/mono/metadata/icall.c
trunk/mono/mono/metadata/threads.c
Log:
2005-05-05 Lluis Sanchez Gual <[EMAIL PROTECTED]>
* threads.c: Enable the wait for running threads when exiting.
* icall.c: Suspend all threads before exiting.
Modified: trunk/mono/mono/metadata/ChangeLog
===================================================================
--- trunk/mono/mono/metadata/ChangeLog 2005-05-05 20:49:34 UTC (rev 44096)
+++ trunk/mono/mono/metadata/ChangeLog 2005-05-05 20:49:52 UTC (rev 44097)
@@ -1,4 +1,8 @@
+2005-05-05 Lluis Sanchez Gual <[EMAIL PROTECTED]>
+ * threads.c: Enable the wait for running threads when exiting.
+ * icall.c: Suspend all threads before exiting.
+
Thu May 5 17:14:27 CEST 2005 Paolo Molaro <[EMAIL PROTECTED]>
* mono-debug.c: unlock properly: the interface with the debugger will
likely
Modified: trunk/mono/mono/metadata/icall.c
===================================================================
--- trunk/mono/mono/metadata/icall.c 2005-05-05 20:49:34 UTC (rev 44096)
+++ trunk/mono/mono/metadata/icall.c 2005-05-05 20:49:52 UTC (rev 44097)
@@ -5176,18 +5176,8 @@
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-05-05 20:49:34 UTC (rev 44096)
+++ trunk/mono/mono/metadata/threads.c 2005-05-05 20:49:52 UTC (rev 44097)
@@ -1762,11 +1762,7 @@
THREAD_DEBUG (g_message ("wait->num is now %d", wait->num));
if(wait->num>0) {
/* Something to wait for */
-
- /*
- * This seems to hang in some cases, so disable it for now.
- */
- //wait_for_tids (wait, INFINITE);
+ wait_for_tids (wait, INFINITE);
}
/*
* give the subthreads a chance to really quit (this is mainly needed
@@ -2408,11 +2404,6 @@
/* this will awake the thread if it is in WaitForSingleObject
or similar */
QueueUserAPC ((PAPCFUNC)dummy_apc, thread->handle, NULL);
- /* Someone is waiting for this thread to be suspended */
- if (mono_runtime_is_shutting_down () &&
thread->suspended_event) {
- return mono_thread_execute_interruption (thread);
- }
-
return NULL;
}
else {
_______________________________________________
Mono-patches maillist - [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches