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:
authorDick Porter <dick@acm.org>2007-02-21 19:45:39 +0300
committerDick Porter <dick@acm.org>2007-02-21 19:45:39 +0300
commite68e73c7efe7a4e28028d3c0a8c43842caf6dc21 (patch)
tree0b47080b2e605d48385fee50862feb6649be4c3f
parent6b2181df333da3201aa21e7aac7af0092a95f155 (diff)
2007-02-16 Dick Porter <dick@ximian.com>mono-1-2-3
* threadpool.c (append_job): Fix fast-path array handling, so it's less likely the array will grow exponentially when the load is heavy. svn path=/branches/mono-1-2-3/mono/; revision=73260
-rw-r--r--mono/metadata/ChangeLog6
-rw-r--r--mono/metadata/threadpool.c2
2 files changed, 7 insertions, 1 deletions
diff --git a/mono/metadata/ChangeLog b/mono/metadata/ChangeLog
index bda10e35eea..4a483382c50 100644
--- a/mono/metadata/ChangeLog
+++ b/mono/metadata/ChangeLog
@@ -1,3 +1,9 @@
+2007-02-16 Dick Porter <dick@ximian.com>
+
+ * threadpool.c (append_job): Fix fast-path array handling, so it's
+ less likely the array will grow exponentially when the load is
+ heavy.
+
Mon Feb 12 21:10:07 CET 2007 Paolo Molaro <lupus@ximian.com>
* loader.c: implemented typedef parent in field memberref.
diff --git a/mono/metadata/threadpool.c b/mono/metadata/threadpool.c
index e334cbc220f..f7367a0a3bf 100644
--- a/mono/metadata/threadpool.c
+++ b/mono/metadata/threadpool.c
@@ -1120,7 +1120,7 @@ static void
append_job (CRITICAL_SECTION *cs, TPQueue *list, MonoObject *ar)
{
EnterCriticalSection (cs);
- if (list->array && mono_array_length (list->array) < list->next_elem) {
+ if (list->array && (list->next_elem < mono_array_length (list->array))) {
mono_array_setref (list->array, list->next_elem, ar);
list->next_elem++;
LeaveCriticalSection (cs);