From 892906d40b99e0332df475177e4e1db0aa77323e Mon Sep 17 00:00:00 2001 From: David Hall Date: Tue, 24 Jan 2017 16:27:11 -0600 Subject: [PATCH] MCOL-513 Use threadpool for session threads --- exemgr/main.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/exemgr/main.cpp b/exemgr/main.cpp index cb84213fd..8ccebcba5 100644 --- a/exemgr/main.cpp +++ b/exemgr/main.cpp @@ -97,6 +97,8 @@ using namespace querytele; #include "utils_utf8.h" #include "boost/filesystem.hpp" +#include "threadpool.h" + namespace { //If any flags other than the table mode flags are set, produce output to screeen @@ -1431,12 +1433,14 @@ int main(int argc, char* argv[]) } } + threadpool::ThreadPool exeMgrThreadPool(serverThreads, serverQueueSize); for (;;) { IOSocket ios; ios = mqs->accept(); - boost::thread thd(SessionThread(ios, ec, rm)); + exeMgrThreadPool.invoke(SessionThread(ios, ec, rm)); } + exeMgrThreadPool.wait(); return 0; }