diff options
author | Thomas White <taw@bitwiz.org.uk> | 2010-10-10 21:24:10 +0200 |
---|---|---|
committer | Thomas White <taw@physics.org> | 2012-02-22 15:27:02 +0100 |
commit | af8365df6966d7ddf3d7c42546a0053717a1d081 (patch) | |
tree | 52a918e63b4dddd26000ff5cad8f2381e0463fb5 /src/thread-pool.c | |
parent | e05bf79a5d1e1c1c2f55164485704d7bc3a8ec95 (diff) |
Tidy up
Diffstat (limited to 'src/thread-pool.c')
-rw-r--r-- | src/thread-pool.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/thread-pool.c b/src/thread-pool.c index 358fb4f3..7781f883 100644 --- a/src/thread-pool.c +++ b/src/thread-pool.c @@ -162,7 +162,7 @@ static void *task_worker(void *pargsv) /* Get a task */ pthread_mutex_lock(&q->lock); - if ( q->n_started >= q->max ) { + if ( (q->max) && (q->n_started >= q->max) ) { pthread_mutex_unlock(&q->lock); break; } |