diff --git a/thread_pool.hpp b/thread_pool.hpp index 8652de1..495ef51 100644 --- a/thread_pool.hpp +++ b/thread_pool.hpp @@ -52,8 +52,8 @@ class thread_pool /* the main loop of the threads */ void loop(); - template - auto _add_task_internal(bool front, F&& f, Args&&... args) + template + auto _add_task_internal(F&& f, Args&&... args) -> std::future(args)...))>; public: @@ -91,8 +91,8 @@ public: inline size_t get_queue_size() const { return queue.size(); } }; -template -auto thread_pool::_add_task_internal(bool front, F&& f, Args&&... args) +template +auto thread_pool::_add_task_internal(F&& f, Args&&... args) -> std::future(args)...))> { auto pckgd_tsk = std::make_shared(args)...))()> > @@ -130,14 +130,14 @@ template auto thread_pool::add_task(F&& f, Args&&... args) -> std::future(args)...))> { - return _add_task_internal(false, std::forward(f), std::forward(args)...); + return _add_task_internal(std::forward(f), std::forward(args)...); } template auto thread_pool::priority_task(F&& f, Args&&... args) -> std::future(args)...))> { - return _add_task_internal(true, std::forward(f), std::forward(args)...); + return _add_task_internal(std::forward(f), std::forward(args)...); } template