System::Threading::Tasks::Task::Task constructor

Task::Task() constructor

Internal constructor for creating uninitialized tasks.

System::Threading::Tasks::Task::Task()

See Also

Task::Task(const Action<SharedPtr<Object>>&, const SharedPtr<Object>&) constructor

Constructs a Task with a stateful action and state object.

System::Threading::Tasks::Task::Task(const Action<SharedPtr<Object>> &action, const SharedPtr<Object> &state)
ParameterTypeDescription
actionconst Action<SharedPtr<Object>>&The action to execute (accepts state object)
stateconst SharedPtr<Object>&User-defined state object passed to the action

See Also

Task::Task(const Action<SharedPtr<Object>>&, const SharedPtr<Object>&, const CancellationToken&) constructor

Constructs a Task with stateful action, state, and cancellation token.

System::Threading::Tasks::Task::Task(const Action<SharedPtr<Object>> &action, const SharedPtr<Object> &state, const CancellationToken &cancellationToken)
ParameterTypeDescription
actionconst Action<SharedPtr<Object>>&The action to execute (accepts state object)
stateconst SharedPtr<Object>&User-defined state object passed to the action
cancellationTokenconst CancellationToken&Token to monitor for cancellation requests

See Also

Task::Task(const Action<>&) constructor

Constructs a Task with an action to execute.

System::Threading::Tasks::Task::Task(const Action<> &action)
ParameterTypeDescription
actionconst Action<>&The action to execute asynchronously

See Also

Task::Task(const Action<>&, const CancellationToken&) constructor

Constructs a Task with an action and cancellation token.

System::Threading::Tasks::Task::Task(const Action<> &action, const CancellationToken &cancellationToken)
ParameterTypeDescription
actionconst Action<>&The action to execute asynchronously
cancellationTokenconst CancellationToken&Token to monitor for cancellation requests

See Also