--- a/src/server/daemon/threadpools.c Mon Jun 24 14:41:32 2013 +0200 +++ b/src/server/daemon/threadpools.c Tue Jun 25 15:45:13 2013 +0200 @@ -41,16 +41,20 @@ threadpool_t *last_thrpool_c = NULL; -int create_threadpool(sstr_t name, ThreadPoolConfig *cfg) { - // TODO: use ThreadPoolConfig - +int create_threadpool(sstr_t name, ThreadPoolConfig *cfg) { if(thread_pool_map == NULL) { thread_pool_map = ucx_map_new(16); } threadpool_t *pool = ucx_map_sstr_get(thread_pool_map, name); if(pool) { - /* TODO: reconfig thread pool */ + if(pool->min_threads > cfg->max_threads) { + pool->min_threads = cfg->min_threads; + pool->max_threads = cfg->max_threads; + } else { + pool->max_threads = cfg->max_threads; + pool->min_threads = cfg->min_threads; + } return 0; } else { threadpool_t *tp = threadpool_new(cfg->min_threads, cfg->max_threads);