diff --git a/src/Thread/threadgroup.h b/src/Thread/threadgroup.h index 67b1644b3..21d689ea5 100644 --- a/src/Thread/threadgroup.h +++ b/src/Thread/threadgroup.h @@ -47,7 +47,7 @@ class thread_group { template std::thread *create_thread(F &&threadfunc) { - auto thread_new = std::make_shared(threadfunc); + auto thread_new = std::make_shared(std::forward(threadfunc)); _thread_id = thread_new->get_id(); _threads[_thread_id] = thread_new; return thread_new.get();