From caafcfbaf9ba13d8f09c4c011b918cdd562884e4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kjist=C3=B3f?= Date: Sun, 27 Nov 2016 19:57:27 +0100 Subject: [PATCH] in loop(), the std::function is now reset after the task is executed --- thread_pool.hpp | 1 + 1 file changed, 1 insertion(+) diff --git a/thread_pool.hpp b/thread_pool.hpp index 914ba01..8652de1 100644 --- a/thread_pool.hpp +++ b/thread_pool.hpp @@ -195,5 +195,6 @@ void thread_pool::loop() queue.pop_front(); } fun(); + fun = nullptr; } }