System::Threading::Tasks::Run method
Contents
[
Hide
]System::Threading::Tasks::Run(const Action<>&) method
Queues the specified work to run on the thread pool and returns a Task handle for that work.
TaskPtr System::Threading::Tasks::Run(const Action<> &action)
| Parameter | Type | Description |
|---|---|---|
| action | const Action<>& | The work to execute asynchronously. |
ReturnValue
A Task that represents the work queued to execute in the thread pool.
See Also
- Typedef TaskPtr
- Typedef Action
- Namespace System::Threading::Tasks
- Library Aspose.PDF for C++
System::Threading::Tasks::Run(const Action<>&, const CancellationToken&) method
Queues the specified work to run on the thread pool and returns a Task handle for that work.
TaskPtr System::Threading::Tasks::Run(const Action<> &action, const CancellationToken &cancellationToken)
| Parameter | Type | Description |
|---|---|---|
| action | const Action<>& | The work to execute asynchronously. |
| cancellationToken | const CancellationToken& | A cancellation token that can be used to cancel the work if it has not yet started. |
ReturnValue
A Task that represents the work queued to execute in the thread pool.
See Also
- Typedef TaskPtr
- Typedef Action
- Class CancellationToken
- Namespace System::Threading::Tasks
- Library Aspose.PDF for C++
System::Threading::Tasks::Run(const Func<TaskPtr>&) method
Queues the specified work to run on the thread pool and returns a proxy for the Task returned by the function.
TaskPtr System::Threading::Tasks::Run(const Func<TaskPtr> &function)
| Parameter | Type | Description |
|---|---|---|
| function | const Func<TaskPtr>& | The work to execute asynchronously, which returns a Task. |
ReturnValue
A Task that represents a proxy for the Task returned by the function.
See Also
- Typedef TaskPtr
- Class Func
- Namespace System::Threading::Tasks
- Library Aspose.PDF for C++
System::Threading::Tasks::Run(const Func<TResult>&) method
Queues the specified work to run on the thread pool and returns a Task
template<typename TResult> RTaskPtr<TResult> System::Threading::Tasks::Run(const Func<TResult> &function)
| Parameter | Description |
|---|---|
| TResult | The type of the result returned by the task. |
| Parameter | Type | Description |
|---|---|---|
| function | const Func<TResult>& | The work to execute asynchronously. |
ReturnValue
A Task
See Also
- Typedef RTaskPtr
- Class Func
- Namespace System::Threading::Tasks
- Library Aspose.PDF for C++