Permalink
Browse files

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.



svn path=/branches/mono-1-2-3/mono/; revision=73260
  • Loading branch information...
1 parent 6b2181d commit e68e73c7efe7a4e28028d3c0a8c43842caf6dc21 @dickp dickp committed Feb 21, 2007
Showing with 7 additions and 1 deletion.
  1. +6 −0 mono/metadata/ChangeLog
  2. +1 −1 mono/metadata/threadpool.c
View
@@ -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.
@@ -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);

0 comments on commit e68e73c

Please sign in to comment.