Metodo System::Threading::Tasks::Run
System::Threading::Tasks::Run(const Action<>&) method
Accoda il lavoro specificato per l’esecuzione nel pool di thread e restituisce un handle Task per quel lavoro.
TaskPtr System::Threading::Tasks::Run(const Action<> &action)
| Parametro | Tipo | Descrizione |
|---|---|---|
| action | const Action<>& | Il lavoro da eseguire in modo asincrono. |
ReturnValue
Un Task che rappresenta il lavoro accodato per l’esecuzione nel pool di thread.
Vedi anche
- Typedef TaskPtr
- Typedef Action
- Namespace System::Threading::Tasks
- Library Aspose.Font for C++
System::Threading::Tasks::Run(const Action<>&, const CancellationToken&) method
Accoda il lavoro specificato per l’esecuzione nel pool di thread e restituisce un handle Task per quel lavoro.
TaskPtr System::Threading::Tasks::Run(const Action<> &action, const CancellationToken &cancellationToken)
| Parametro | Tipo | Descrizione |
|---|---|---|
| action | const Action<>& | Il lavoro da eseguire in modo asincrono. |
| cancellationToken | const CancellationToken& | Un token di cancellazione che può essere usato per annullare il lavoro se non è ancora iniziato. |
ReturnValue
Un Task che rappresenta il lavoro accodato per l’esecuzione nel pool di thread.
Vedi anche
- Typedef TaskPtr
- Typedef Action
- Class CancellationToken
- Namespace System::Threading::Tasks
- Library Aspose.Font for C++
System::Threading::Tasks::Run(const Func<TaskPtr>&) method
Accoda il lavoro specificato per l’esecuzione nel pool di thread e restituisce un proxy per il Task restituito dalla funzione.
TaskPtr System::Threading::Tasks::Run(const Func<TaskPtr> &function)
| Parametro | Tipo | Descrizione |
|---|---|---|
| function | const Func<TaskPtr>& | Il lavoro da eseguire in modo asincrono, che restituisce un Task. |
ReturnValue
Un Task che rappresenta un proxy per il Task restituito dalla funzione.
Vedi anche
- Typedef TaskPtr
- Class Func
- Namespace System::Threading::Tasks
- Library Aspose.Font for C++
System::Threading::Tasks::Run(const Func<TResult>&) method
Accoda il lavoro specificato per l’esecuzione nel pool di thread e restituisce un handle Task
template<typename TResult> RTaskPtr<TResult> System::Threading::Tasks::Run(const Func<TResult> &function)
| Parametro | Descrizione |
|---|---|
| TResult | Il tipo del risultato restituito dal task. |
| Parametro | Tipo | Descrizione |
|---|---|---|
| funzione | const Func<TResult>& | Il lavoro da eseguire in modo asincrono. |
ReturnValue
Un Task
Vedi anche
- Typedef RTaskPtr
- Class Func
- Namespace System::Threading::Tasks
- Library Aspose.Font for C++