From: Sebastian Wilhelmi Date: Mon, 26 Feb 2001 14:27:12 +0000 (+0000) Subject: Make max_unused_threads work for -1 as well. X-Git-Tag: GLIB_1_3_3~94 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=5215807c6c2072a4937a6e30a2f5e7b63e0742cc;p=platform%2Fupstream%2Fglib.git 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. --- diff --git a/ChangeLog b/ChangeLog index 490be93..76eadce 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 490be93..76eadce 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 490be93..76eadce 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 490be93..76eadce 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 490be93..76eadce 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 490be93..76eadce 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 490be93..76eadce 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 490be93..76eadce 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 afc2007..00b6a65 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 afc2007..00b6a65 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]);