System.MonitorWait

From RAD Studio API Documentation
Jump to: navigation, search

Delphi

function MonitorWait(const AObject: TObject; Timeout: Cardinal): Boolean;
function MonitorWait(const AObject: TObject; const ALock: TObject; Timeout: Cardinal): Boolean;

C++

extern DELPHI_PACKAGE bool __fastcall MonitorWait(TObject* const AObject, unsigned Timeout)/* overload */;

Properties

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

Description

Drops the lock on the specified object and puts the calling thread in the waiting queue for a specified amount of time.

Use MonitorWait to drop the lock on the specified object and also to put the calling thread in the waiting queue for the amount of time specified by the Timeout parameter. Hence, the calling thread is blocked until it is again able to lock AObject.

See Also