System.Threading.TTask.WaitForAll
Delphi
class function WaitForAll(const Tasks: array of ITask): Boolean; overload; static;
class function WaitForAll(const Tasks: array of ITask; Timeout: LongWord): Boolean; overload; static;
class function WaitForAll(const Tasks: array of ITask; const Timeout: TTimeSpan): Boolean; overload; static;
C++
static bool __fastcall WaitForAll(_di_ITask const *Tasks, const int Tasks_High)/* overload */;
static bool __fastcall WaitForAll(_di_ITask const *Tasks, const int Tasks_High, unsigned Timeout)/* overload */;
static bool __fastcall WaitForAll(_di_ITask const *Tasks, const int Tasks_High, const System::Timespan::TTimeSpan &Timeout)/* overload */;
Properties
Type | Visibility | Source | Unit | Parent |
---|---|---|---|---|
function | public | System.Threading.pas System.Threading.hpp |
System.Threading | TTask |
Description
WaitForAll calls DoWaitForAll, which waits for all the tasks in the array to be completed.
The WaitForAll method returns True
if it succeeds, False
otherwise.
Call the first overloaded WaitForAll method with the parameters described below:
Parameter | Meaning |
Tasks
|
The array of tasks that should be completed before the calling tasks can continue. |
Call the second overloaded WaitForAll method with the parameters described below:
Parameter | Meaning |
Tasks
|
The array of tasks that should be completed before the calling tasks can continue. |
Timeout
|
The method waits a Timeout number of milliseconds for the array of tasks to be completed. If the Timeout occurs before the tasks are completed, the method will return False . This is a LongWord variable type.
|
Call the third overloaded WaitForAll method with the parameters described below:
Parameter | Meaning |
Tasks
|
The array of tasks that should be completed before the calling tasks can continue. |
Timeout
|
The method waits a Timeout number of milliseconds for the array of tasks to be completed. If the Timeout occurs before the tasks are completed, the method will return False . This is a TTimeSpan variable type and it is converted to milliseconds before calling DoWaitForAll.
|