A factory method for creating a task_handle object.
const _Function& _Func
The type of the function object that will be invoked to execute the work represented by the task_handle object.
The function that will be invoked to execute the work represented by the task_handle object. This may be a lambda functor, a pointer to a function, or any object that supports a version of the function call operator with the signature void operator()().
This function is useful when you need to create a task_handle object with a lambda expression, because it allows you to create the object without knowing the true type of the lambda functor.