API:Data.DBXPlatform.TDBXSemaphore.Acquire
[–] Properties | |
---|---|
Type: function | |
Visibility: public | |
Source: Data.DBXPlatform.pas Data.DBXPlatform.hpp
| |
Unit: Data.DBXPlatform | |
Parent: TDBXSemaphore |
Delphi
function Acquire(Timeout: Int64): Boolean; reintroduce;
C++
HIDESBASE bool __fastcall Acquire(__int64 Timeout);
Description
Attempts to acquire a lock on the semaphore.
Data.DBXPlatform.TDBXSemaphore.Acquire inherits from System.SyncObjs.TSemaphore.Acquire. All content below this line refers to System.SyncObjs.TSemaphore.Acquire.
Attempts to acquire a lock on the semaphore.
Call Acquire from the thread that needs to use some of a shared resource's units.
The Acquire method waits until the semaphore becomes free, that is, the number of free units of the resource is nonzero. Then the Acquire method acquires a lock on the semaphore.
If the semaphore is not free, then the calling thread is added to the semaphore waiting queue.