System.Threading.TTask.DoWaitForAny
Delphi
class function DoWaitForAny(const Tasks: array of ITask; Timeout: LongWord): Integer; static;
C++
static int __fastcall DoWaitForAny(const _di_ITask *Tasks, const int Tasks_High, unsigned Timeout);
Properties
Type | Visibility | Source | Unit | Parent |
---|---|---|---|---|
function | protected | System.Threading.pas System.Threading.hpp |
System.Threading | TTask |
Description
DoWaitForAny pauses the calling task until any of the tasks in the array finishes or the Timeout
occurs.
If everything worked well, the function returns the index of the task in the array that finished allowing the calling task to continue. Otherwise, it returns -1
.