System.Threading.TTask.DoWaitForAny
Delphi
class function DoWaitForAny(const Tasks: array of ITask; Timeout: Cardinal): Integer; static;
C++
static int __fastcall DoWaitForAny(const _di_ITask *Tasks, const int Tasks_High, unsigned Timeout);
Propriétés
| Type | Visibilité | Source | Unité | Parent | 
|---|---|---|---|---|
| function | protected | System.Threading.pas System.Threading.hpp | System.Threading | TTask | 
Description
DoWaitForAny suspend la tâche d'appel jusqu'à ce que l'une des tâches du tableau se termine ou que le délai d'attente Timeout soit atteint.
Si tout a bien fonctionné, la fonction renvoie l'index de la tâche qui s'est terminée dans le tableau, autorisant la tâche d'appel à poursuivre. Sinon, elle renvoie -1.