System.SyncObjs.THandleObject.WaitForMultiple

From RAD Studio API Documentation
Jump to: navigation, search

Delphi

class function WaitForMultiple(const HandleObjs: THandleObjectArray;  Timeout: Cardinal; AAll: Boolean; out SignaledObj: THandleObject; UseCOMWait: Boolean = False; Len: Integer = 0): TWaitResult;

C++

__classmethod System::Types::TWaitResult __fastcall WaitForMultiple(const THandleObjectArray HandleObjs, unsigned Timeout, bool AAll, /* out */ THandleObject* &SignaledObj, bool UseCOMWait = false, int Len = 0x0);

Properties

Type Visibility Source Unit Parent
function public
System.SyncObjs.pas
System.SyncObjs.hpp
System.SyncObjs THandleObject

Description

Waits until a list of THandleObject objects enters into the signaled state.

Call WaitForMultiple to wait until a list of THandleObject objects enters into the signaled state. If the signaled state is not reached after TimeOut milliseconds, WaitForMultiple returns anyway.

The HandleObjs parameter contains the list of objects that are waited on.

If the AAll parameter is true, the call will finish only after all objects become signaled.

The first signaled object is passed into the SignaledObj parameter. This only happens if the function returns wrSignaled and AAll is False.

Set the UseCOMWait parameter to ensure that when a thread is blocked and waiting for the object, any STA COM calls can be made back into this thread.

Len contains the number of objects that are monitored in the given list.

The function returns a result of TWaitResult type, which can be used to detect how the operation finished.

See Also