Compartir a través de


task_handle::task_handle Constructor

Constructs a new task_handle object. The work of the task is performed by invoking the function specified as a parameter to the constructor.

task_handle(
   const _Function& _Func
);

Parameters

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

Remarks

The runtime creates a copy of the work function that you pass to the constructor. Therefore, any state changes that occur in a function object that you pass to a task_handle object will not appear in your copy of that function object.

Requirements

Header: ppl.h

Namespace: concurrency

See Also

Reference

task_handle Class