System.SyncObjs.TMutex.Acquire

From RAD Studio API Documentation
Jump to: navigation, search

Delphi

procedure Acquire; override;

C++

virtual void __fastcall Acquire();

Properties

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

Description

Attempts to acquire a lock on the mutex.

Call Acquire from the thread that needs to use a shared resource.

The Acquire method waits until the mutex becomes free, and then acquires an exclusive lock. This blocks all other threads from acquiring the mutex. Later, calling the Release method will make the mutex available for other threads to acquire.

See Also

Code Examples