Make max_unused_threads work for -1 as well.
authorSebastian Wilhelmi <wilhelmi@ira.uka.de>
Mon, 26 Feb 2001 14:27:12 +0000 (14:27 +0000)
committerSebastian Wilhelmi <wilhelmi@src.gnome.org>
Mon, 26 Feb 2001 14:27:12 +0000 (14:27 +0000)
2001-02-26  Sebastian Wilhelmi  <wilhelmi@ira.uka.de>

* gthreadpool.c (g_thread_pool_thread_proxy): Make
max_unused_threads work for -1 as well.

ChangeLog
ChangeLog.pre-2-0
ChangeLog.pre-2-10
ChangeLog.pre-2-12
ChangeLog.pre-2-2
ChangeLog.pre-2-4
ChangeLog.pre-2-6
ChangeLog.pre-2-8
glib/gthreadpool.c
gthreadpool.c

index 490be93..76eadce 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2001-02-26  Sebastian Wilhelmi  <wilhelmi@ira.uka.de>
+
+       * gthreadpool.c (g_thread_pool_thread_proxy): Make
+       max_unused_threads work for -1 as well.
+
 2001-02-23  Sebastian Wilhelmi  <wilhelmi@ira.uka.de>
 
        * gthread.h (struct _GThread): Change the order to match the order
index 490be93..76eadce 100644 (file)
@@ -1,3 +1,8 @@
+2001-02-26  Sebastian Wilhelmi  <wilhelmi@ira.uka.de>
+
+       * gthreadpool.c (g_thread_pool_thread_proxy): Make
+       max_unused_threads work for -1 as well.
+
 2001-02-23  Sebastian Wilhelmi  <wilhelmi@ira.uka.de>
 
        * gthread.h (struct _GThread): Change the order to match the order
index 490be93..76eadce 100644 (file)
@@ -1,3 +1,8 @@
+2001-02-26  Sebastian Wilhelmi  <wilhelmi@ira.uka.de>
+
+       * gthreadpool.c (g_thread_pool_thread_proxy): Make
+       max_unused_threads work for -1 as well.
+
 2001-02-23  Sebastian Wilhelmi  <wilhelmi@ira.uka.de>
 
        * gthread.h (struct _GThread): Change the order to match the order
index 490be93..76eadce 100644 (file)
@@ -1,3 +1,8 @@
+2001-02-26  Sebastian Wilhelmi  <wilhelmi@ira.uka.de>
+
+       * gthreadpool.c (g_thread_pool_thread_proxy): Make
+       max_unused_threads work for -1 as well.
+
 2001-02-23  Sebastian Wilhelmi  <wilhelmi@ira.uka.de>
 
        * gthread.h (struct _GThread): Change the order to match the order
index 490be93..76eadce 100644 (file)
@@ -1,3 +1,8 @@
+2001-02-26  Sebastian Wilhelmi  <wilhelmi@ira.uka.de>
+
+       * gthreadpool.c (g_thread_pool_thread_proxy): Make
+       max_unused_threads work for -1 as well.
+
 2001-02-23  Sebastian Wilhelmi  <wilhelmi@ira.uka.de>
 
        * gthread.h (struct _GThread): Change the order to match the order
index 490be93..76eadce 100644 (file)
@@ -1,3 +1,8 @@
+2001-02-26  Sebastian Wilhelmi  <wilhelmi@ira.uka.de>
+
+       * gthreadpool.c (g_thread_pool_thread_proxy): Make
+       max_unused_threads work for -1 as well.
+
 2001-02-23  Sebastian Wilhelmi  <wilhelmi@ira.uka.de>
 
        * gthread.h (struct _GThread): Change the order to match the order
index 490be93..76eadce 100644 (file)
@@ -1,3 +1,8 @@
+2001-02-26  Sebastian Wilhelmi  <wilhelmi@ira.uka.de>
+
+       * gthreadpool.c (g_thread_pool_thread_proxy): Make
+       max_unused_threads work for -1 as well.
+
 2001-02-23  Sebastian Wilhelmi  <wilhelmi@ira.uka.de>
 
        * gthread.h (struct _GThread): Change the order to match the order
index 490be93..76eadce 100644 (file)
@@ -1,3 +1,8 @@
+2001-02-26  Sebastian Wilhelmi  <wilhelmi@ira.uka.de>
+
+       * gthreadpool.c (g_thread_pool_thread_proxy): Make
+       max_unused_threads work for -1 as well.
+
 2001-02-23  Sebastian Wilhelmi  <wilhelmi@ira.uka.de>
 
        * gthread.h (struct _GThread): Change the order to match the order
index afc2007..00b6a65 100644 (file)
@@ -125,7 +125,7 @@ g_thread_pool_thread_proxy (gpointer data)
          g_async_queue_lock (unused_thread_queue[priority]);
 
          G_LOCK (unused_threads);
-         if (unused_threads >= max_unused_threads)
+         if (unused_threads >= max_unused_threads && max_unused_threads != -1)
            {
              G_UNLOCK (unused_threads);
              g_async_queue_unlock (unused_thread_queue[priority]);
index afc2007..00b6a65 100644 (file)
@@ -125,7 +125,7 @@ g_thread_pool_thread_proxy (gpointer data)
          g_async_queue_lock (unused_thread_queue[priority]);
 
          G_LOCK (unused_threads);
-         if (unused_threads >= max_unused_threads)
+         if (unused_threads >= max_unused_threads && max_unused_threads != -1)
            {
              G_UNLOCK (unused_threads);
              g_async_queue_unlock (unused_thread_queue[priority]);