Fix pool_submit, create threads as long as we're under the max count.

This commit is contained in:
Howard Chu 2005-10-27 21:55:18 +00:00
parent 675cda1b62
commit 71514ffb92

View file

@ -368,13 +368,8 @@ ldap_pvt_thread_pool_submit (
return(0);
}
ldap_pvt_thread_cond_signal(&pool->ltp_cond);
if ((pool->ltp_open_count <= 0
#if 0
|| pool->ltp_pending_count > 1
#endif
|| pool->ltp_open_count == pool->ltp_active_count)
&& (pool->ltp_max_count <= 0
|| pool->ltp_open_count < pool->ltp_max_count))
if (pool->ltp_max_count <= 0
|| pool->ltp_open_count < pool->ltp_max_count)
{
pool->ltp_open_count++;
pool->ltp_starting++;