Commit abcbc03c authored by Poul-Henning Kamp's avatar Poul-Henning Kamp

Don't call SES_NewPool() until there is at least one idle thread

in the thread pool.
parent 7c145b20
......@@ -471,6 +471,7 @@ pool_herder(void *priv)
pool_breed(pp);
continue;
}
assert(pp->nthr >= cache_param->wthread_min);
if (pp->nthr > cache_param->wthread_min) {
......@@ -549,6 +550,9 @@ pool_mkpool(unsigned pool_no)
AZ(pthread_cond_init(&pp->herder_cond, NULL));
AZ(pthread_create(&pp->herder_thr, NULL, pool_herder, pp));
while (VTAILQ_EMPTY(&pp->idle_queue))
usleep(10000);
pp->sesspool = SES_NewPool(pp, pool_no);
AN(pp->sesspool);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment