System.TMonitor.Wait

From RAD Studio API Documentation
Jump to: navigation, search

Delphi

class function Wait(const AObject: TObject; Timeout: Cardinal): Boolean; overload; static;
class function Wait(const AObject, ALock: TObject; Timeout: Cardinal): Boolean; overload; static;

C++

static bool __fastcall Wait(TObject* const AObject, unsigned Timeout)/* overload */;
static bool __fastcall Wait(TObject* const AObject, TObject* const ALock, unsigned Timeout)/* overload */;

Properties

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

Description

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

Use Wait 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 in the Timeout parameter. Therefore, the calling thread is blocked until it is again able to lock AObject.

See Also