auto task = task_type(std::forward<Func>(func));\r
auto future = task.get_future();\r
\r
+ if(!is_running_)\r
+ return std::move(future); \r
+\r
task.set_wait_callback(std::function<void(task_type&)>([=](task_type& my_task) // The std::function wrapper is required in order to add ::result_type to functor class.\r