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:
authorZoltan Varga <vargaz@gmail.com>2010-04-08 02:44:06 +0400
committerZoltan Varga <vargaz@gmail.com>2010-04-08 02:44:06 +0400
commitd3fd72552f0eeb975503879bf020e7f7e7b52011 (patch)
tree991487c38e01e06d52c454252cad1b7cc81daa12
parent236bad85c405820bd31644d3dd109ea1eba16a3a (diff)
2010-04-08 Zoltan Varga <vargaz@gmail.com>
* icall.c (ves_icall_System_Environment_Exit): Shutdown the threadpool before waiting for all threads to suspend, as those threads can't be suspended. svn path=/branches/mono-2-6/mono/; revision=155006
-rw-r--r--mono/metadata/ChangeLog5
-rw-r--r--mono/metadata/icall.c3
2 files changed, 8 insertions, 0 deletions
diff --git a/mono/metadata/ChangeLog b/mono/metadata/ChangeLog
index ea164d85955..bfee1f86790 100644
--- a/mono/metadata/ChangeLog
+++ b/mono/metadata/ChangeLog
@@ -1,5 +1,10 @@
2010-04-08 Zoltan Varga <vargaz@gmail.com>
+ * icall.c (ves_icall_System_Environment_Exit): Shutdown the threadpool before
+ waiting for all threads to suspend, as those threads can't be suspended.
+
+2010-04-08 Zoltan Varga <vargaz@gmail.com>
+
* threads.c (mono_thread_suspend_all_other_threads): Call ensure_synch_cs_set ()
to avoid crashes on newly created threads.
diff --git a/mono/metadata/icall.c b/mono/metadata/icall.c
index ce7a159c6aa..56016fd0316 100644
--- a/mono/metadata/icall.c
+++ b/mono/metadata/icall.c
@@ -6430,6 +6430,9 @@ ves_icall_System_Environment_Exit (int result)
mono_runtime_set_shutting_down ();
+ /* This will kill the tp threads which cannot be suspended */
+ mono_thread_pool_cleanup ();
+
/* Suspend all managed threads since the runtime is going away */
mono_thread_suspend_all_other_threads ();