Make max_unused_threads work for -1 as well.

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.
This commit is contained in:
Sebastian Wilhelmi 2001-02-26 14:27:12 +00:00 committed by Sebastian Wilhelmi
parent 2395a333cc
commit 5215807c6c
10 changed files with 42 additions and 2 deletions

View 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

View 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

View 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

View 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

View 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

View 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

View 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

View 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

View 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]);

View 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]);