From 5215807c6c2072a4937a6e30a2f5e7b63e0742cc Mon Sep 17 00:00:00 2001 From: Sebastian Wilhelmi Date: Mon, 26 Feb 2001 14:27:12 +0000 Subject: [PATCH] Make max_unused_threads work for -1 as well. 2001-02-26 Sebastian Wilhelmi * gthreadpool.c (g_thread_pool_thread_proxy): Make max_unused_threads work for -1 as well. --- ChangeLog | 5 +++++ ChangeLog.pre-2-0 | 5 +++++ ChangeLog.pre-2-10 | 5 +++++ ChangeLog.pre-2-12 | 5 +++++ ChangeLog.pre-2-2 | 5 +++++ ChangeLog.pre-2-4 | 5 +++++ ChangeLog.pre-2-6 | 5 +++++ ChangeLog.pre-2-8 | 5 +++++ glib/gthreadpool.c | 2 +- gthreadpool.c | 2 +- 10 files changed, 42 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index 490be935d..76eadce08 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2001-02-26 Sebastian Wilhelmi + + * gthreadpool.c (g_thread_pool_thread_proxy): Make + max_unused_threads work for -1 as well. + 2001-02-23 Sebastian Wilhelmi * gthread.h (struct _GThread): Change the order to match the order diff --git a/ChangeLog.pre-2-0 b/ChangeLog.pre-2-0 index 490be935d..76eadce08 100644 --- a/ChangeLog.pre-2-0 +++ b/ChangeLog.pre-2-0 @@ -1,3 +1,8 @@ +2001-02-26 Sebastian Wilhelmi + + * gthreadpool.c (g_thread_pool_thread_proxy): Make + max_unused_threads work for -1 as well. + 2001-02-23 Sebastian Wilhelmi * gthread.h (struct _GThread): Change the order to match the order diff --git a/ChangeLog.pre-2-10 b/ChangeLog.pre-2-10 index 490be935d..76eadce08 100644 --- a/ChangeLog.pre-2-10 +++ b/ChangeLog.pre-2-10 @@ -1,3 +1,8 @@ +2001-02-26 Sebastian Wilhelmi + + * gthreadpool.c (g_thread_pool_thread_proxy): Make + max_unused_threads work for -1 as well. + 2001-02-23 Sebastian Wilhelmi * gthread.h (struct _GThread): Change the order to match the order diff --git a/ChangeLog.pre-2-12 b/ChangeLog.pre-2-12 index 490be935d..76eadce08 100644 --- a/ChangeLog.pre-2-12 +++ b/ChangeLog.pre-2-12 @@ -1,3 +1,8 @@ +2001-02-26 Sebastian Wilhelmi + + * gthreadpool.c (g_thread_pool_thread_proxy): Make + max_unused_threads work for -1 as well. + 2001-02-23 Sebastian Wilhelmi * gthread.h (struct _GThread): Change the order to match the order diff --git a/ChangeLog.pre-2-2 b/ChangeLog.pre-2-2 index 490be935d..76eadce08 100644 --- a/ChangeLog.pre-2-2 +++ b/ChangeLog.pre-2-2 @@ -1,3 +1,8 @@ +2001-02-26 Sebastian Wilhelmi + + * gthreadpool.c (g_thread_pool_thread_proxy): Make + max_unused_threads work for -1 as well. + 2001-02-23 Sebastian Wilhelmi * gthread.h (struct _GThread): Change the order to match the order diff --git a/ChangeLog.pre-2-4 b/ChangeLog.pre-2-4 index 490be935d..76eadce08 100644 --- a/ChangeLog.pre-2-4 +++ b/ChangeLog.pre-2-4 @@ -1,3 +1,8 @@ +2001-02-26 Sebastian Wilhelmi + + * gthreadpool.c (g_thread_pool_thread_proxy): Make + max_unused_threads work for -1 as well. + 2001-02-23 Sebastian Wilhelmi * gthread.h (struct _GThread): Change the order to match the order diff --git a/ChangeLog.pre-2-6 b/ChangeLog.pre-2-6 index 490be935d..76eadce08 100644 --- a/ChangeLog.pre-2-6 +++ b/ChangeLog.pre-2-6 @@ -1,3 +1,8 @@ +2001-02-26 Sebastian Wilhelmi + + * gthreadpool.c (g_thread_pool_thread_proxy): Make + max_unused_threads work for -1 as well. + 2001-02-23 Sebastian Wilhelmi * gthread.h (struct _GThread): Change the order to match the order diff --git a/ChangeLog.pre-2-8 b/ChangeLog.pre-2-8 index 490be935d..76eadce08 100644 --- a/ChangeLog.pre-2-8 +++ b/ChangeLog.pre-2-8 @@ -1,3 +1,8 @@ +2001-02-26 Sebastian Wilhelmi + + * gthreadpool.c (g_thread_pool_thread_proxy): Make + max_unused_threads work for -1 as well. + 2001-02-23 Sebastian Wilhelmi * gthread.h (struct _GThread): Change the order to match the order diff --git a/glib/gthreadpool.c b/glib/gthreadpool.c index afc2007db..00b6a65d4 100644 --- a/glib/gthreadpool.c +++ b/glib/gthreadpool.c @@ -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]); diff --git a/gthreadpool.c b/gthreadpool.c index afc2007db..00b6a65d4 100644 --- a/gthreadpool.c +++ b/gthreadpool.c @@ -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]);