make_task Function

Information
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.
This topic has not yet been rated - Rate this topic

A factory method for creating a task_handle object.

template <
   class _Function
>
task_handle<_Function> make_task(
   const _Function& _Func
);
_Function

The type of the function object that will be invoked to execute the work represented by the task_handle object.

_Func

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()().

A task_handle object.

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.

Header: ppl.h

Namespace: concurrency

Did you find this helpful?
(1500 characters remaining)
© 2013 Microsoft. All rights reserved.