Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/mono.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaolo Molaro <lupus@oddwiz.org>2004-09-07 15:27:35 +0400
committerPaolo Molaro <lupus@oddwiz.org>2004-09-07 15:27:35 +0400
commit9d0bce5b2c7acd4939422fe9dd1e5a50dba11191 (patch)
tree89e880af6c593e7a437371d32ac9011a82370074
parent84880d4c9eb0d342ce1b05769b212cf7cbe03eb1 (diff)
Tue Sep 7 14:35:26 CEST 2004 Paolo Molaro <lupus@ximian.com>
* threads.c: sched_yield() on exit, to allow threads to quit. svn path=/trunk/mono/; revision=33490
-rw-r--r--mono/metadata/ChangeLog5
-rw-r--r--mono/metadata/threads.c8
2 files changed, 13 insertions, 0 deletions
diff --git a/mono/metadata/ChangeLog b/mono/metadata/ChangeLog
index 72173edbc3c..1f4266b03d0 100644
--- a/mono/metadata/ChangeLog
+++ b/mono/metadata/ChangeLog
@@ -1,3 +1,8 @@
+
+Tue Sep 7 14:35:26 CEST 2004 Paolo Molaro <lupus@ximian.com>
+
+ * threads.c: sched_yield() on exit, to allow threads to quit.
+
2004-09-07 Zoltan Varga <vargaz@freemail.hu>
* object.c (mono_unhandled_exception): Remove leftover debug code.
diff --git a/mono/metadata/threads.c b/mono/metadata/threads.c
index 1d0409946ca..195549d0bbd 100644
--- a/mono/metadata/threads.c
+++ b/mono/metadata/threads.c
@@ -1450,6 +1450,14 @@ void mono_thread_manage (void)
/* Something to wait for */
wait_for_tids (wait, INFINITE);
}
+ /*
+ * give the subthreads a chance to really quit (this is mainly needed
+ * to get correct user and system times from getrusage/wait/time(1)).
+ * This could be removed if we avoid pthread_detach() and use pthread_join().
+ */
+#ifndef PLATFORM_WIN32
+ sched_yield ();
+#endif
g_free (wait);
}