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; } }