diff --git a/cmake/vars.cmake b/cmake/vars.cmake index 20a6e658d..f8eb938dd 100644 --- a/cmake/vars.cmake +++ b/cmake/vars.cmake @@ -65,6 +65,7 @@ set(EVPP_HEADERS evpp/TcpServer.h evpp/UdpClient.h evpp/UdpServer.h + evpp/TimerThread.h ) set(PROTOCOL_HEADERS diff --git a/cpputil/hthreadpool.h b/cpputil/hthreadpool.h index 8df987178..ae7635b4f 100644 --- a/cpputil/hthreadpool.h +++ b/cpputil/hthreadpool.h @@ -80,7 +80,10 @@ class HThreadPool { int stop() { if (status == STOP) return -1; - status = STOP; + { + std::unique_lock locker(task_mutex); + status = STOP; + } task_cond.notify_all(); for (auto& i : threads) { if (i.thread->joinable()) {