148 } |
148 } |
149 |
149 |
150 |
150 |
151 void shutdown_threadpools(int timeout) { |
151 void shutdown_threadpools(int timeout) { |
152 log_ereport(LOG_INFORM, "shutdown threadpools"); |
152 log_ereport(LOG_INFORM, "shutdown threadpools"); |
153 CxIterator i = cxMapIteratorValues(thread_pool_map); |
153 CxMapIterator i = cxMapIteratorValues(thread_pool_map); |
154 cx_foreach(threadpool_t*, tp, i) { |
154 cx_foreach(threadpool_t*, tp, i) { |
155 threadpool_shutdown(tp, timeout); |
155 threadpool_shutdown(tp, timeout); |
156 } |
156 } |
157 i = cxMapIteratorValues(io_pool_map); |
157 i = cxMapIteratorValues(io_pool_map); |
158 cx_foreach(threadpool_t*, tp, i) { |
158 cx_foreach(threadpool_t*, tp, i) { |
159 threadpool_shutdown(tp, timeout); |
159 threadpool_shutdown(tp, timeout); |
160 } |
160 } |
161 cxMapDestroy(thread_pool_map); |
161 cxMapFree(thread_pool_map); |
162 cxMapDestroy(io_pool_map); |
162 cxMapFree(io_pool_map); |
163 } |
163 } |